-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(LibCarla): port lane marking, waypoint loop, lane corners, and pugixml null fixes #9652
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
Open
youtalk
wants to merge
4
commits into
carla-simulator:ue5-dev
Choose a base branch
from
youtalk:fix/opendrive-lane-waypoint-fixes
base: ue5-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4ed5370
fix(road): port lane marking, waypoint loop, lane corners, and pugixm…
youtalk 8f31a84
Update LibCarla/source/carla/road/Map.cpp
youtalk 76a41ee
fix(road): prevent infinite loop on degenerate tree-placement edges
youtalk ad4cd4c
fix(road): pass extra_width parameter to ComputeEdgesForLanemark
youtalk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| // Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma | ||
| // de Barcelona (UAB). | ||
| // | ||
| // This work is licensed under the terms of the MIT license. | ||
| // For a copy, see <https://opensource.org/licenses/MIT>. | ||
|
|
||
| #include "test.h" | ||
| #include <pugixml/pugixml.hpp> | ||
|
|
||
| using namespace pugi; | ||
|
|
||
| TEST(pugixml, null_pointer_dereference_insert_move_before) { | ||
| // Create an empty node (without root, _root = nullptr) | ||
| xml_node empty_node; | ||
| ASSERT_FALSE(empty_node); | ||
|
|
||
| // Create a valid document | ||
| xml_document doc; | ||
| xml_node root = doc.append_child("root"); | ||
| xml_node child1 = root.append_child("child1"); | ||
| xml_node child2 = root.append_child("child2"); | ||
|
|
||
| // Attempt insert_move_before from an empty node | ||
| // Before the patch this would crash, now it should return an empty xml_node | ||
| xml_node result = empty_node.insert_move_before(child2, child1); | ||
|
|
||
| // Verify it returns an empty node without crashing | ||
| EXPECT_FALSE(result); | ||
| } | ||
|
|
||
| TEST(pugixml, null_pointer_dereference_insert_move_after) { | ||
| // Create an empty node | ||
| xml_node empty_node; | ||
|
|
||
| // Create a valid document | ||
| xml_document doc; | ||
| xml_node root = doc.append_child("root"); | ||
| xml_node child1 = root.append_child("child1"); | ||
| xml_node child2 = root.append_child("child2"); | ||
|
|
||
| // Attempt insert_move_after from an empty node | ||
| xml_node result = empty_node.insert_move_after(child2, child1); | ||
|
|
||
| // Verify it returns an empty node without crashing | ||
| EXPECT_FALSE(result); | ||
| } | ||
|
|
||
| TEST(pugixml, null_pointer_dereference_insert_child_before) { | ||
| // Create an empty node | ||
| xml_node empty_node; | ||
|
|
||
| // Create a valid document | ||
| xml_document doc; | ||
| xml_node root = doc.append_child("root"); | ||
| xml_node child = root.append_child("child"); | ||
|
|
||
| // Attempt insert_child_before from an empty node | ||
| xml_node result = empty_node.insert_child_before(node_element, child); | ||
|
|
||
| // Verify it returns an empty node without crashing | ||
| EXPECT_FALSE(result); | ||
| } | ||
|
|
||
| TEST(pugixml, null_pointer_dereference_insert_child_after) { | ||
| // Create an empty node | ||
| xml_node empty_node; | ||
|
|
||
| // Create a valid document | ||
| xml_document doc; | ||
| xml_node root = doc.append_child("root"); | ||
| xml_node child = root.append_child("child"); | ||
|
|
||
| // Attempt insert_child_after from an empty node | ||
| xml_node result = empty_node.insert_child_after(node_element, child); | ||
|
|
||
| // Verify it returns an empty node without crashing | ||
| EXPECT_FALSE(result); | ||
| } | ||
|
|
||
| TEST(pugixml, null_pointer_dereference_insert_copy_before) { | ||
| // Create an empty node | ||
| xml_node empty_node; | ||
|
|
||
| // Create a valid document | ||
| xml_document doc; | ||
| xml_node root = doc.append_child("root"); | ||
| xml_node child = root.append_child("child"); | ||
| xml_node proto = root.append_child("proto"); | ||
|
|
||
| // Attempt insert_copy_before from an empty node | ||
| xml_node result = empty_node.insert_copy_before(proto, child); | ||
|
|
||
| // Verify it returns an empty node without crashing | ||
| EXPECT_FALSE(result); | ||
| } | ||
|
|
||
| TEST(pugixml, null_pointer_dereference_insert_copy_after) { | ||
| // Create an empty node | ||
| xml_node empty_node; | ||
|
|
||
| // Create a valid document | ||
| xml_document doc; | ||
| xml_node root = doc.append_child("root"); | ||
| xml_node child = root.append_child("child"); | ||
| xml_node proto = root.append_child("proto"); | ||
|
|
||
| // Attempt insert_copy_after from an empty node | ||
| xml_node result = empty_node.insert_copy_after(proto, child); | ||
|
|
||
| // Verify it returns an empty node without crashing | ||
| EXPECT_FALSE(result); | ||
youtalk marked this conversation as resolved.
Show resolved
Hide resolved
youtalk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.