Skip to content

Conversation

AV-Security
Copy link

Describe the bug

While testing, we found that the prediction module sometimes crashed due to out-of-range access. The log of the prediction module is as follows.
111

System information

OS Platform and Distribution: Ubuntu 18.04

Apollo installed from (source or binary): source

Apollo version : master (master branch -commit e373b20

To Reproduce

The cyber record link: https://drive.google.com/file/d/1fgo5Tz2XXT8VTuH2FazXTdXe-lRcLSWn/view?usp=sharing

Additional context

We found that the crash occurred in function JointlyPredictionPlanningEvaluator::ExtractADCTrajectory.

When the size of the input trajectory_points is 0, when accessing the trajectory_points- >at(i).path_point().x() at line 547 (the i is 0), an out_of_range error occurs and causes a crash.
222
Further, we found that the JointlyPredictionPlanningEvaluator::Evaluate function incorrectly called ExtractADCTrajectory, which caused the crash. When the size of adc_traj.trajectory_point() is 1, the judgment on line 328 can be passed, but the size of adc_traj_curr_pos will be 0, causing the above crash.

Solution
Therefore, we recommend setting the threshold for judgment on line 328 to 2. This modification can avoid the above errors and will not affect the functionality of thisfunction.
333

@daohu527 daohu527 self-assigned this Jul 26, 2024
@daohu527 daohu527 added the Module: Prediction Indicates prediction issues label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module: Prediction Indicates prediction issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants