Fix tree support crash generation - #2370
Open
Erwan MATHIEU (wawanbreton) wants to merge 2 commits into
Open
Conversation
CURA-13183 Previously, the TreeSupportElement objects were stored directly in a map, and some pointers over them were used. However the maps can be reorganized in memory, so that makes these pointers very unsafe. Now we use (smart) pointers in the maps so that they can be references without issues. This also removes memory duplication of the elements in various maps, and boilerplate code to actually place the objects in the maps.
Erwan MATHIEU (wawanbreton)
force-pushed
the
CURA-13304_crash-smoothed-support-on-model
branch
from
September 9, 2026 15:22
c3e992e to
cd6991c
Compare
Erwan MATHIEU (wawanbreton)
left a comment
Contributor
Author
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: cd6991c | Previous: b0efb82 | Ratio |
|---|---|---|---|
SimplifyTestFixture/simplify_slot_noplugin |
4.05119484426529 ns/iter |
2.53327894515077 ns/iter |
1.60 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: Jelle Spijker (@jellespijker) Erwan MATHIEU (@wawanbreton) Casper Lamboo (@casperlamboo) HellAholic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the
TreeSupportElementobjects were stored directly in a map, and some pointers over them were used. However the maps can be reorganized in memory, so that makes these pointers very unsafe. Now we use smart pointers in the maps so that they can be referenced without issues. This also removes memory duplication of the elements in various maps, and boilerplate code to actually place the objects in the maps.Note: the fix was made previously in the tree support improvement spike. It was just cherry-picked here.
CURA-13304