-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Crash due to unexpected free()
on cairo_data
#1909
Comments
I investigated the reasons of such behaviour. There is an implicit construction of the |
- Added a workaround for misaligned SubmapSlice structure between cartographer and cartographer_ros built using different compilers or compile contexts - Rearranged SubmapSlice field order after static analysis performed with clangd - Added commented non-portable workaround with \#pragma pack - Closes cartographer-project#1909
- Added a workaround for misaligned SubmapSlice structure between cartographer and cartographer_ros built using different compilers or compile contexts - Rearranged SubmapSlice field order after static analysis performed with clangd - Added commented non-portable workaround with \#pragma pack - Closes cartographer-project#1909 Signed-off-by: Andrey Vukolov <[email protected]>
I built Cartographer with Clang 15, activating Polly optimizer and C++17 for my own customized build of ROS1 for Ubuntu 22.04/Mint Linux. However, this build of Cartographer library crashes while working with Cairo submap slices. This issue exists due to unexpected calling
free()
on the content of thecairo_data
field ofSubmapSlice
structure. Below is the GDB output:Here is the cause:
The program crashes because the default destructor of
SubmapSlice
structure tries to clearcairo_data
field callingfree()
on each element.Does anyone know a workaround? And another question: does this issue come from Cairo API?
The text was updated successfully, but these errors were encountered: