Open
Conversation
…emerge_/ada/tz8rb3to, emerge_/ada/g7wez8su
- Fixed buffer overflow in init_grid_map (grid_index bounds check) - Fixed truncated binary file detection in load_map_binary - Fixed large ID overflow in save_map_binary for nuplan - Changed VLA to heap allocation in init_grid_map - Updated drive.ini settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Greptile SummaryThis PR reorganizes training scripts and unifies configuration terminology across the codebase. Key Changes
Issues Found
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: be81b52 |
Comment on lines
+877
to
+881
| # Truncate large IDs to fit in int32 range | ||
| obj_id = obj.get("id", 0) | ||
| if isinstance(obj_id, int) and (obj_id > 2147483647 or obj_id < -2147483648): | ||
| obj_id = obj_id % 2147483647 | ||
| f.write(struct.pack("i", obj_id)) # id |
There was a problem hiding this comment.
ID truncation with modulo risks collisions - two large IDs (e.g., 2147483648 and 4295967295) both map to 1
Suggested change
| # Truncate large IDs to fit in int32 range | |
| obj_id = obj.get("id", 0) | |
| if isinstance(obj_id, int) and (obj_id > 2147483647 or obj_id < -2147483648): | |
| obj_id = obj_id % 2147483647 | |
| f.write(struct.pack("i", obj_id)) # id | |
| # Truncate large IDs to fit in int32 range - use hash to avoid collisions | |
| obj_id = obj.get("id", 0) | |
| if isinstance(obj_id, int) and (obj_id > 2147483647 or obj_id < -2147483648): | |
| obj_id = hash(obj_id) % 2147483647 |
Comment on lines
228
to
+233
|
|
||
| # Check if resources directory exists | ||
| binary_path = f"{map_dir}/map_000.bin" | ||
| # Check if resources directory exists (check map_001 since some datasets start at 001) | ||
| binary_path = f"{map_dir}/map_001.bin" | ||
| if not os.path.exists(binary_path): | ||
| raise FileNotFoundError( | ||
| f"Required directory {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." | ||
| f"Required file {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." |
There was a problem hiding this comment.
Changed check from map_000.bin to map_001.bin - breaks datasets that start at map_000
Suggested change
| # Check if resources directory exists | |
| binary_path = f"{map_dir}/map_000.bin" | |
| # Check if resources directory exists (check map_001 since some datasets start at 001) | |
| binary_path = f"{map_dir}/map_001.bin" | |
| if not os.path.exists(binary_path): | |
| raise FileNotFoundError( | |
| f"Required directory {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." | |
| f"Required file {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." | |
| # Check if resources directory exists (try both map_000 and map_001) | |
| binary_path = f"{map_dir}/map_000.bin" | |
| if not os.path.exists(binary_path): | |
| binary_path = f"{map_dir}/map_001.bin" | |
| if not os.path.exists(binary_path): | |
| raise FileNotFoundError( | |
| f"Required files not found in {map_dir}. Please ensure the Drive maps are downloaded and installed correctly per docs." | |
| ) |
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.
No description provided.