-
Notifications
You must be signed in to change notification settings - Fork 370
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
Fixes crash when deallocating rbt_node in windows #770
Conversation
Does the CI work for Although the fix is intended for Windows, maybe we should proposed this to |
@yuumasato make check is broken on master AFAIK. |
@yuumasato If we move this fix to maint-1.2, shouldn't this "Windows support" be there as well? |
NACK. Incomplete fix, the same issue is in the other free method. Instead of linking MSDN docs that anybody can google please explain why we need to do aligned_free. Ref where the aligned_malloc happens. |
maint-1.2 doesn't use aligned_malloc so this issue is not there. this should go to |
@mpreisler @yuumasato updated |
// using free for memory allocated through _aligned_malloc is illegal | ||
// rbt_str.c -> rbt_str_node_alloc | ||
// https://msdn.microsoft.com/en-us/library/8z34s9c6.aspx | ||
_aligned_free(rbt_walk_top()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indents
// using free for memory allocated through _aligned_malloc is illegal | ||
// rbt_i32.c -> rbt_i32_node_alloc | ||
// https://msdn.microsoft.com/en-us/library/8z34s9c6.aspx | ||
_aligned_free(rbt_node_ptr(n)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indents
// using free for memory allocated through _aligned_malloc is illegal | ||
// rbt_i64.c -> rbt_i64_node_alloc | ||
// https://msdn.microsoft.com/en-us/library/8z34s9c6.aspx | ||
_aligned_free(rbt_node_ptr(n)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mpreisler I just followed the current identation, should I make a new identation in the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use tabs for indents, only reindent the code you changed to avoid merge conflicts
in other words all new code should follow the rules, keep the old code as it is
@mpreisler indentation fixed |
@WesleyCeraso rbt_free will still crash, won't it? Also, could you use curly braces in case the statements are multi line? Somebody will at some point add another statement and the whole thing will stop working. It gets confusing especially with the macros. |
Fixes OpenSCAP/scap-workbench#129 and OpenSCAP/scap-workbench#61 Signed-off-by: Wesley Ceraso Prudencio <wcerasop@redhat.com>
ACK |
Fixes OpenSCAP/scap-workbench#129 and OpenSCAP/scap-workbench#61
Signed-off-by: Wesley Ceraso Prudencio wcerasop@redhat.com