Include UndefinedBehavior Sanitizer to our CI #46062
Copy link
Copy link
Closed
Description
Hi!
Are we interested in including an Undefined Behavior Sanitizer (pretty similar to our test-asan) in our CI workflow?
I know that currently, our CI takes a quite long time to conclude (considering flaky tests), but, undefined behavior is very often harmful to compiler assumptions and eventually, makes a branch slower.
I made a test including this flag only on macOS (just to test a particular case), but in case we concur on having this as an option I can pursue this work. See https://github.com/nodejs/node/compare/main...RafaelGSS:node:build/incldue-ub-build?expand=1
Interested in hearing your thoughts @nodejs/build @richardlau @addaleax
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
bnoordhuis commentedon Jan 2, 2023
It's the other way around: UB gives the compiler a free pass to completely optimize away buggy code. :-)
Something to investigate is if V8 is ubsan-clean nowadays. It didn't used to be (v8:3770) but I see there's an ubsan buildbot now and a
-fsanitize=undefinedswitch in BUILD.gn so... maybe?RafaelGSS commentedon Jan 3, 2023
From my local tests, only
small-icuisn't ubsan-clean.bnoordhuis commentedon Jan 3, 2023
I've opened a tracking issue for libuv: libuv/libuv#3869
I believe libuv is in reasonably good shape already but we'll see.
bnoordhuis commentedon Jan 4, 2023
libuv/libuv#3870 - libuv has a ubsan CI bot now (and it's clean.)
RafaelGSS commentedon Jan 11, 2023
Excellent. I think we could skip the
small-icufor now, what do you think? In the case of affirmative, I can open the PR to include the workflow.bnoordhuis commentedon Jan 11, 2023
Sounds good.