Skip to content

ci: print stack traces on UBSAN errors in the ASAN CI build#2447

Merged
htuch merged 1 commit intoenvoyproxy:masterfrom
brian-pane:ubsan-backtrace
Jan 24, 2018
Merged

ci: print stack traces on UBSAN errors in the ASAN CI build#2447
htuch merged 1 commit intoenvoyproxy:masterfrom
brian-pane:ubsan-backtrace

Conversation

@brian-pane
Copy link
Copy Markdown
Contributor

Description:
UBSAN doesn't show stack traces by default, so this diff adds the environment variable
needed to enable stack traces.

Risk Level: Low

Testing: The CircleCI ASAN run will exercise this code change.

Docs Changes: N/A

Release Notes: N/A

Signed-off-by: Brian Pane bpane@pinterest.com

Signed-off-by: Brian Pane <bpane@pinterest.com>
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ta muchly.

--verbose_failures ${BAZEL_OPTIONS} --action_env=HOME --action_env=PYTHONUSERBASE \
--jobs=${NUM_CPUS} --show_task_finish ${BAZEL_BUILD_EXTRA_OPTIONS}"
export BAZEL_TEST_OPTIONS="${BAZEL_BUILD_OPTIONS} --test_env=HOME --test_env=PYTHONUSERBASE \
--test_env=UBSAN_OPTIONS=print_stacktrace=1 \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could optionally be made local to the ASAN/UBSAN invocation, but looking at docs (https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) it seems harmless to do it here as well.

Copy link
Copy Markdown
Contributor

@dnoe dnoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

@htuch htuch merged commit 5f96cf7 into envoyproxy:master Jan 24, 2018
@brian-pane brian-pane deleted the ubsan-backtrace branch January 25, 2018 21:59
jpsim added a commit that referenced this pull request Nov 28, 2022
Signed-off-by: GitHub Action <noreply@github.com>

Co-authored-by: jpsim <jpsim@users.noreply.github.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim added a commit that referenced this pull request Nov 29, 2022
Signed-off-by: GitHub Action <noreply@github.com>

Co-authored-by: jpsim <jpsim@users.noreply.github.com>
Signed-off-by: JP Simard <jp@jpsim.com>
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