Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a BUG #106

Open
hjwdzh opened this issue Jul 13, 2016 · 5 comments
Open

Find a BUG #106

hjwdzh opened this issue Jul 13, 2016 · 5 comments

Comments

@hjwdzh
Copy link

hjwdzh commented Jul 13, 2016

Please see MATH\IBFS\IBFS.cpp line 214

...
a->rCap = ta->cap
a->rev = arcs + (ta->rev-tmpArcs)

At least when building with 32 bit, modifying a->rCap will result in change in ta->rev when ta=taEnd-1, which will incorrectly modify the value of a->rev. It will cause ReconstructMesh to crash.

@hjwdzh
Copy link
Author

hjwdzh commented Jul 13, 2016

Switch these two lines will solve the problem

@cdcseacave
Copy link
Owner

I can not see why modifying a->rCap will result in change in ta->rev?

@hjwdzh
Copy link
Author

hjwdzh commented Jul 13, 2016

Because tmparcs and arcs share the memory called memArcs in the function initSize

@cdcseacave
Copy link
Owner

rCap is a float and rev is a pointer, 2 separate variables; how modifying one changes the value of the other?

@hjwdzh
Copy link
Author

hjwdzh commented Jul 13, 2016

modifying a->rCap resulting in change of ta->rev

ta and a are defined as different structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants