Skip to content

Fix two undefined behavior issues (pipeline/config, elpp) - #10876

Merged
maloel merged 2 commits into
realsenseai:developmentfrom
riking:patch-471841322
Sep 7, 2022
Merged

Fix two undefined behavior issues (pipeline/config, elpp)#10876
maloel merged 2 commits into
realsenseai:developmentfrom
riking:patch-471841322

Conversation

@riking

@riking riking commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

pipeline/config: initialize playback_loop

We found a UBSan complaint of the value 173 being stored into a boolean in the copy constructor.

third-party/easyloggingpp: work around global init order bug

The validateFileRolling function is called during the static initialization of an el::Storage, but it tries to access the global el::Storage. Clang compiles this into a branch to ud1. Instead, just skip the function call.

PiperOrigin-RevId: 471841322


The easylogging patch was the quick-and-dirty method to get our binaries to stop crashing. If you have suggestions for a better patch, I'm willing to explore them.

pipeline/config: initialize playback_loop

We found a UBSan complaint of the value 173 being stored into a boolean in the copy constructor.

third-party/easyloggingpp: work around global init order bug

The validateFileRolling function is called during the static initialization of an el::Storage, but it tries to access the global el::Storage. Clang compiles this into a branch to ud1. Instead, just skip the function call.

PiperOrigin-RevId: 471841322
@Nir-Az
Nir-Az requested a review from maloel September 7, 2022 06:19
@Nir-Az

Nir-Az commented Sep 7, 2022

Copy link
Copy Markdown
Collaborator

@maloel
maloel changed the base branch from master to development September 7, 2022 07:19
@maloel

maloel commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

EasyLogging++ has fixed this too, it seems. I've opened a PR to upgrade to their latest.

@riking thanks for the incentive :)

I'm going to try to remove the easylogging fix from this PR and then merge it...

@maloel maloel mentioned this pull request Sep 7, 2022
@maloel
maloel merged commit eb740b9 into realsenseai:development Sep 7, 2022
@maloel

maloel commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

@riking if the issue persists for you in ELPP, please let us know

@riking
riking deleted the patch-471841322 branch September 7, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants