Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnome: Fix building gir with asan again #3955

Merged
merged 1 commit into from Jul 29, 2018

Conversation

Projects
None yet
6 participants
@TingPing
Copy link
Member

TingPing commented Jul 27, 2018

asan must be first in ldflags and this order was lost in cb36add

So this is the most simple solution of just putting it first in internal_ldflags (maybe not ideal).

See #2117 (comment)

gnome: Fix building gir with asan again
asan must be first in ldflags and this order was lost in cb36add

So this is the most simple solution of just putting it first in internal_ldflags

See #2117 (comment)

@jpakkane jpakkane merged commit bd21987 into master Jul 29, 2018

2 of 3 checks passed

Sider The Sider analysis is canceled.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jpakkane jpakkane deleted the tingping/fix-gi-asan-again branch Jul 29, 2018

@nirbheek nirbheek added this to the 0.47.2 milestone Aug 7, 2018

@chergert

This comment has been minimized.

Copy link

chergert commented Aug 28, 2018

I think things might have regressed again. I went to build things today, and updated various stuff, and seeing this again.

[christian@tinybox build]$ ninja 
[109/822] Generating Gstyle-1.0.gir with a custom command.
FAILED: src/gstyle/Gstyle-1.0.gir 
/opt/gnome/bin/g-ir-scanner -I/opt/gnome/include/gobject-introspection-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -pthread --no-libtool --namespace=Gstyle --nsversion=1.0 --warn-all --output src/gstyle/Gstyle-1.0.gir --c-include=gstyle-private.h -I/home/christian/Projects/gnome-builder/src/gstyle -I/home/christian/Projects/gnome-builder/build/src/gstyle --filelist=/home/christian/Projects/gnome-builder/build/src/gstyle/src@gstyle@@gstyle-private@sha/Gstyle_1.0_gir_filelist --include=Gdk-3.0 --include=Gio-2.0 --include=Gtk-3.0 --include=GtkSource-4 --symbol-prefix=gstyle --identifier-prefix=Gstyle --cflags-begin -DHAVE_CONFIG_H -I/home/christian/Projects/gnome-builder/build -D_GNU_SOURCE -DIDE_COMPILATION -Wcast-align -Wdeclaration-after-statement -Werror=address -Werror=array-bounds -Werror=empty-body -Werror=implicit -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=init-self -Werror=int-conversion -Werror=int-to-pointer-cast -Werror=main -Werror=misleading-indentation -Werror=missing-braces -Werror=missing-include-dirs -Werror=nonnull -Werror=overflow -Werror=pointer-arith -Werror=pointer-to-int-cast -Werror=redundant-decls -Werror=return-type -Werror=sequence-point -Werror=shadow -Werror=strict-prototypes -Werror=trigraphs -Werror=undef -Werror=write-strings -Wformat-nonliteral -Werror=format-security -Werror=format=2 -Wignored-qualifiers -Wimplicit-function-declaration -Wlogical-op -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wno-cast-function-type -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunused -fno-strict-aliasing -fstack-protector-strong -fsanitize=address -fno-omit-frame-pointer -I/opt/gnome/include/libdazzle-1.0 -I/opt/gnome/include/gtk-3.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -I/opt/gnome/include/fribidi -I/opt/gnome/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/libdrm -I/opt/gnome/include/harfbuzz -I/opt/gnome/include/gdk-pixbuf-2.0 -I/opt/gnome/include/gio-unix-2.0 -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/at-spi2-atk/2.0 -I/opt/gnome/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/libxml2 --cflags-end --library gstyle-private -L/home/christian/Projects/gnome-builder/build/src/gstyle -L/opt/gnome/lib -lasan -L/opt/gnome/lib/ --extra-library=dazzle-1.0 -L/opt/gnome/lib --extra-library=gtk-3 --extra-library=gdk-3 --extra-library=pangocairo-1.0 --extra-library=pango-1.0 --extra-library=atk-1.0 --extra-library=cairo-gobject --extra-library=cairo --extra-library=gdk_pixbuf-2.0 --extra-library=gio-2.0 --extra-library=gobject-2.0 --extra-library=glib-2.0 --extra-library=m --extra-library=xml2
g-ir-scanner: link: cc -o /home/christian/Projects/gnome-builder/build/tmp-introspectj6kg1349/Gstyle-1.0 -ggdb -O2 -fno-omit-frame-pointer /home/christian/Projects/gnome-builder/build/tmp-introspectj6kg1349/Gstyle-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstyle-private -lasan -ldazzle-1.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -lxml2 -L/home/christian/Projects/gnome-builder/build/src/gstyle -Wl,-rpath,/home/christian/Projects/gnome-builder/build/src/gstyle -L/opt/gnome/lib -Wl,-rpath,/opt/gnome/lib -L/opt/gnome/lib/ -Wl,-rpath,/opt/gnome/lib/ -L/opt/gnome/lib -Wl,-rpath,/opt/gnome/lib -L/opt/gnome/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0 -L/opt/gnome/lib
==15017==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
Command '['/home/christian/Projects/gnome-builder/build/tmp-introspectj6kg1349/Gstyle-1.0', '--introspect-dump=/home/christian/Projects/gnome-builder/build/tmp-introspectj6kg1349/functions.txt,/home/christian/Projects/gnome-builder/build/tmp-introspectj6kg1349/dump.xml']' returned non-zero exit status 1.
[114/822] Compiling C object 'src/libide/src@libide@@ide-1.0@sha/debugger_ide-debugger-locals-view.c.o'.
ninja: build stopped: subcommand failed.
@TingPing

This comment has been minimized.

Copy link
Member Author

TingPing commented Aug 28, 2018

Looks like a couple of commits have touched that area, might need to bisect.

@nirbheek Is there a way to have CI run a few tests with asan on?

@nirbheek

This comment has been minimized.

Copy link
Member

nirbheek commented Aug 29, 2018

@nirbheek Is there a way to have CI run a few tests with asan on?

The best way is probably to add a unit test in run_unittests.py: LinuxlikeTests.

@NickeZ

This comment has been minimized.

Copy link
Contributor

NickeZ commented Aug 29, 2018

I tried adding asan tests in my PR but there is some state leakage between tests thati can't figure out..

#3290

@chergert

This comment has been minimized.

Copy link

chergert commented Aug 29, 2018

I got around to bisecting this, and commit 8377ea4 from #3688 is what broke things.

@MathieuDuponchelle

This comment has been minimized.

Copy link
Contributor

MathieuDuponchelle commented Aug 29, 2018

My bad, this was very much needed and I was hoping that as the unit tests were passing I hadn't broken anything. If you provide me with a unit test I'll take a look at that.

@chergert

This comment has been minimized.

Copy link

chergert commented Aug 29, 2018

The only test case I have so far is building Builder with -Db_sanitize=address after having built libdazzle/jsonrpc-glib with -Db_sanitize=address.

Someone from the meson team will have to create a unit test since I'm just a user.

@MathieuDuponchelle

This comment has been minimized.

Copy link
Contributor

MathieuDuponchelle commented Aug 29, 2018

OK, can you try applying https://pastebin.com/VZXJBKMt on your end maybe ?

@chergert

This comment has been minimized.

Copy link

chergert commented Aug 29, 2018

Similar error as before with meh.txt applied on top of master. Did a rm -rf of the build dir to ensure that nothing lingered from a previous build.

[95/822] Generating Gstyle-1.0.gir with a custom command.
FAILED: src/gstyle/Gstyle-1.0.gir 
/opt/gnome/bin/g-ir-scanner -I/opt/gnome/include/gobject-introspection-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -pthread --no-libtool --namespace=Gstyle --nsversion=1.0 --warn-all --output src/gstyle/Gstyle-1.0.gir --c-include=gstyle-private.h -I/home/christian/Projects/gnome-builder/src/gstyle -I/home/christian/Projects/gnome-builder/build/src/gstyle --filelist=/home/christian/Projects/gnome-builder/build/src/gstyle/src@gstyle@@gstyle-private@sha/Gstyle_1.0_gir_filelist --include=Gdk-3.0 --include=Gio-2.0 --include=Gtk-3.0 --include=GtkSource-4 --symbol-prefix=gstyle --identifier-prefix=Gstyle --cflags-begin -DHAVE_CONFIG_H -I/home/christian/Projects/gnome-builder/build -D_GNU_SOURCE -DIDE_COMPILATION -Wcast-align -Wdeclaration-after-statement -Werror=address -Werror=array-bounds -Werror=empty-body -Werror=implicit -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=init-self -Werror=int-conversion -Werror=int-to-pointer-cast -Werror=main -Werror=misleading-indentation -Werror=missing-braces -Werror=missing-include-dirs -Werror=nonnull -Werror=overflow -Werror=pointer-arith -Werror=pointer-to-int-cast -Werror=redundant-decls -Werror=return-type -Werror=sequence-point -Werror=shadow -Werror=strict-prototypes -Werror=trigraphs -Werror=undef -Werror=write-strings -Wformat-nonliteral -Werror=format-security -Werror=format=2 -Wignored-qualifiers -Wimplicit-function-declaration -Wlogical-op -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wno-cast-function-type -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunused -fno-strict-aliasing -fstack-protector-strong -fsanitize=address -fno-omit-frame-pointer -I/opt/gnome/include/libdazzle-1.0 -I/opt/gnome/include/gtk-3.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -I/opt/gnome/include/fribidi -I/opt/gnome/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/libdrm -I/opt/gnome/include/harfbuzz -I/opt/gnome/include/gdk-pixbuf-2.0 -I/opt/gnome/include/gio-unix-2.0 -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/at-spi2-atk/2.0 -I/opt/gnome/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/libxml2 --cflags-end --library gstyle-private -L/home/christian/Projects/gnome-builder/build/src/gstyle -lasan -L/opt/gnome/lib -L/opt/gnome/lib/ --extra-library=dazzle-1.0 -L/opt/gnome/lib --extra-library=gtk-3 --extra-library=gdk-3 --extra-library=pangocairo-1.0 --extra-library=pango-1.0 --extra-library=atk-1.0 --extra-library=cairo-gobject --extra-library=cairo --extra-library=gdk_pixbuf-2.0 --extra-library=gio-2.0 --extra-library=gobject-2.0 --extra-library=glib-2.0 --extra-library=m --extra-library=xml2
g-ir-scanner: link: cc -o /home/christian/Projects/gnome-builder/build/tmp-introspects62tkhus/Gstyle-1.0 -ggdb -O2 -fno-omit-frame-pointer /home/christian/Projects/gnome-builder/build/tmp-introspects62tkhus/Gstyle-1.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -lgstyle-private -lasan -ldazzle-1.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -lxml2 -L/home/christian/Projects/gnome-builder/build/src/gstyle -Wl,-rpath,/home/christian/Projects/gnome-builder/build/src/gstyle -L/opt/gnome/lib -Wl,-rpath,/opt/gnome/lib -L/opt/gnome/lib/ -Wl,-rpath,/opt/gnome/lib/ -L/opt/gnome/lib -Wl,-rpath,/opt/gnome/lib -L/opt/gnome/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0 -L/opt/gnome/lib
==4596==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
Command '['/home/christian/Projects/gnome-builder/build/tmp-introspects62tkhus/Gstyle-1.0', '--introspect-dump=/home/christian/Projects/gnome-builder/build/tmp-introspects62tkhus/functions.txt,/home/christian/Projects/gnome-builder/build/tmp-introspects62tkhus/dump.xml']' returned non-zero exit status 1.
[100/822] Compiling C object 'src/libide/src@libide@@ide-1.0@sha/buildui_ide-environment-editor-row.c.o'.
ninja: build stopped: subcommand failed.
@MathieuDuponchelle

This comment has been minimized.

Copy link
Contributor

MathieuDuponchelle commented Aug 29, 2018

OK, then probably this: https://pastebin.com/C73JM1QZ

@nirbheek

This comment has been minimized.

Copy link
Member

nirbheek commented Aug 29, 2018

@MathieuDuponchelle you can test this yourself by running:

$ cd "test cases/frameworks/7 gnome"
$ meson _build -Db_sanitize=address
$ ninja -C _build
@MathieuDuponchelle

This comment has been minimized.

Copy link
Contributor

MathieuDuponchelle commented Aug 29, 2018

\o/ tnx

@MathieuDuponchelle

This comment has been minimized.

Copy link
Contributor

MathieuDuponchelle commented Aug 29, 2018

Yup, that fixes it for me

@MathieuDuponchelle

This comment has been minimized.

Copy link
Contributor

MathieuDuponchelle commented Aug 29, 2018

See #4099

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.