Closed cbalint13 closed 2 years ago
We should definitely fix the issues this flag catches. However it will have a runtime performance cost. Are you saying every release package has this flag on all the time, not just during development?
We should definitely fix the issues this flag catches.
However it will have a runtime performance cost.
GLIBCXX_ASSERTIONS
the cost isn't noticeable, compilers do a great job "hiding it".Are you saying every release package has this flag on all the time, not just during development?
Using it even in final releases allows catching new uncovered bugs from the very users.
In RHEL land these are the mandatory flags (even many more) involved:
$ rpm --eval %{optflags}
-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
A documentation of them is here .
Beyond GLIBCXX_ASSERTIONS
there are: stack-smash, origin-annotations, lto and some more.
The very GLIBCXX_ASSERTIONS
is a built-in type, it's absence cannot be "negociated" with releng team
:)
Thanks, ~cristian.
I've fixed a bunch of these (https://github.com/The-OpenROAD-Project/OpenROAD/pull/1765). The last all seem to come down the tmg* code which is really bad code in odb. Maybe its time to finally clean it up as fixing anything in there is excruciating.
@cbalint13 do you recommend that we also enable this for https://github.com/hdl/conda-eda/tree/master/pnr/openroad? maybe that could be something enable for CMake for all Release build?
@cbalint13 do you recommend that we also enable this for https://github.com/hdl/conda-eda/tree/master/pnr/openroad? maybe that could be something enable for CMake for all Release build?
@proppy ,
You can for all else but not for openroad
,I suggest not yet, until all regression tests pass.
opernroad
native packages I had to disable it.With it, openroad
will fail on simple designs (e.g. the spm form openlane) at antenna-checking step.
It's enabled everywhere else (in that repo) except the openroad
package.
@proppy ,
cvc
also fail with boundary check:
https://copr-dist-git.fedorainfracloud.org/cgit/rezso/VLSI/cvc.git/tree/cvc.spec#n42Double checked: all tools are fine, except cvc
and openroad
(opensta
+ abc
are fine as external).
All regressions have been fixed but I'm going to run all ORFS designs before closing this.
@cbalint13 cvc issues should be filed at https://github.com/d-m-bailey/cvc
All designs pass but some of the ISPD routing benchmarks have issues that need looking into.
All designs pass but some of the ISPD routing benchmarks have issues that need looking into.
-fanalyser
in GCC Land .
There are no failing regressions on latest a1cd122fe9bf2e6cb7b2b05be43c50dc5599d8f2 (2022/04/10) unless boundary checks are enabled.
Suggestions:
for the betterment we could try enable
-Wp,-D_GLIBCXX_ASSERTIONS
compile flags and lets start investigate each failure.boundary check enabled environment also help daily development process acting as an immediate guard against odd things.
as releng practice, boundary check is mandatory & enforced by default on all packages in distros like RHEL / Fedora.
Observations:
(x) Enabling boundary checks reveals these:
(x) All the above fails due to boundary issues, e.g:
The documentation is way too summary, it covers more than enlisted there. A little sample (e.g. on a generic std::vector) on how boundary checks works:
It runs, doesn't fail:
Now failures are guaranteed:
Cc @maliberty
Thanks, ~cristian.