* Re: Ubsan merged into trunk
@ 2013-08-30 19:40 Dominique Dhumieres
2013-08-30 19:51 ` Jakub Jelinek
0 siblings, 1 reply; 12+ messages in thread
From: Dominique Dhumieres @ 2013-08-30 19:40 UTC (permalink / raw)
To: gcc-patches; +Cc: IainS, polacek
> I've just merged ubsan into trunk. Please send complaints my way.
Bootstrap is broken on x86_64-apple-darwin10:
Making all in ubsan
make[4]: *** No rule to make target `../interception/libinterception.la', needed by `libubsan.la'. Stop.
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-stage1-target-libsanitizer] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
TIA
Dominique
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-30 19:40 Ubsan merged into trunk Dominique Dhumieres
@ 2013-08-30 19:51 ` Jakub Jelinek
2013-08-31 15:09 ` Iain Sandoe
0 siblings, 1 reply; 12+ messages in thread
From: Jakub Jelinek @ 2013-08-30 19:51 UTC (permalink / raw)
To: Dominique Dhumieres; +Cc: gcc-patches, IainS, polacek
On Fri, Aug 30, 2013 at 09:38:01PM +0200, Dominique Dhumieres wrote:
> > I've just merged ubsan into trunk. Please send complaints my way.
>
> Bootstrap is broken on x86_64-apple-darwin10:
>
> Making all in ubsan
> make[4]: *** No rule to make target `../interception/libinterception.la', needed by `libubsan.la'. Stop.
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all-stage1-target-libsanitizer] Error 2
> make[1]: *** [stage1-bubble] Error 2
> make: *** [all] Error 2
libsanitizer/asan/Makefile.am has
if USING_MAC_INTERPOSE
libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
else
libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la
endif
libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
(wonder why not
libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
if !USING_MAC_INTERPOSE
libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
endif
libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
). In any case, guess ubsan/Makefile.am needs the same ugliness, and
perhaps tsan/Makefile.am too (though, tsan isn't supported on darwin, so
it doesn't matter that much).
Jakub
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-30 19:51 ` Jakub Jelinek
@ 2013-08-31 15:09 ` Iain Sandoe
2013-08-31 15:16 ` Marek Polacek
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Iain Sandoe @ 2013-08-31 15:09 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Dominique Dhumieres, GCC Patches, polacek
Hi,
On 30 Aug 2013, at 20:43, Jakub Jelinek wrote:
> On Fri, Aug 30, 2013 at 09:38:01PM +0200, Dominique Dhumieres wrote:
>>> I've just merged ubsan into trunk. Please send complaints my way.
>>
>> Bootstrap is broken on x86_64-apple-darwin10:
> (wonder why not
> libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
> if !USING_MAC_INTERPOSE
> libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
> endif
> libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
> ).
… indeed, that's what I did for ubsan.
> perhaps tsan/Makefile.am too (though, tsan isn't supported on darwin, so
> it doesn't matter that much).
tsan isn't relevant (yet): although, when we get some time to work on it, native thread support should be feasible for Darwin >= 11.
===
the patch below fixes bootstrap - along the lines of your observation;
it also fixes the specs to actually use the library (so that the tests pass too).
bootstrapped x86_64-darwin12 for c,c++ and fortran (objc and ada bootstraps are broken from other causes).
[also bootstrapped on x86_64-linux, and checked RUNTESTFLAGS="asan.exp ubsan.exp"]
OK for trunk?
Iain
gcc:
* config/darwin.h (LINK_COMMAND_SPEC_A): Revise sanitiser specs to
include sanitise(undefined).
libsanitiser:
* ubsan/Makefile.am (libubsan_la_LIBADD): Revise to omit libinterception.la
for Darwin.
* ubsan/Makefile.in: Regenerate.
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 202118)
+++ gcc/config/darwin.h (working copy)
@@ -178,10 +178,11 @@ extern GTY(()) int darwin_ms_struct;
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
- %{%:sanitize(address): -lasan } \
%{fgnu-tm: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
%{!nostdlib:%{!nodefaultlibs:\
+ %{%:sanitize(address): -lasan } \
+ %{%:sanitize(undefined): -lubsan } \
%(link_ssp) %(link_gcc_c_sequence)\
}}\
%{!nostdlib:%{!nostartfiles:%E}} %{T*} %{F*} }}}}}}}"
Index: libsanitizer/ubsan/Makefile.am
===================================================================
--- libsanitizer/ubsan/Makefile.am (revision 202118)
+++ libsanitizer/ubsan/Makefile.am (working copy)
@@ -18,7 +18,11 @@ ubsan_files = \
ubsan_value.cc
libubsan_la_SOURCES = $(ubsan_files)
-libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(LIBSTDCXX_RAW_CXX_LDFLAGS)
+libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
+if !USING_MAC_INTERPOSE
+libubsan_la_LIBADD += $(top_builddir)/interception/libinterception.la
+endif
+libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl
# Work around what appears to be a GNU make bug handling MAKEFLAGS
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-31 15:09 ` Iain Sandoe
@ 2013-08-31 15:16 ` Marek Polacek
2013-08-31 21:00 ` Dominique Dhumieres
2013-09-01 11:35 ` Jakub Jelinek
2 siblings, 0 replies; 12+ messages in thread
From: Marek Polacek @ 2013-08-31 15:16 UTC (permalink / raw)
To: Iain Sandoe; +Cc: Jakub Jelinek, Dominique Dhumieres, GCC Patches
On Sat, Aug 31, 2013 at 04:04:03PM +0100, Iain Sandoe wrote:
> Hi,
>
> On 30 Aug 2013, at 20:43, Jakub Jelinek wrote:
>
> > On Fri, Aug 30, 2013 at 09:38:01PM +0200, Dominique Dhumieres wrote:
> >>> I've just merged ubsan into trunk. Please send complaints my way.
> >>
> >> Bootstrap is broken on x86_64-apple-darwin10:
>
> > (wonder why not
> > libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
> > if !USING_MAC_INTERPOSE
> > libasan_la_LIBADD += $(top_builddir)/interception/libinterception.la
> > endif
> > libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
> > ).
>
> ⦠indeed, that's what I did for ubsan.
>
> > perhaps tsan/Makefile.am too (though, tsan isn't supported on darwin, so
> > it doesn't matter that much).
>
> tsan isn't relevant (yet): although, when we get some time to work on it, native thread support should be feasible for Darwin >= 11.
>
> ===
>
> the patch below fixes bootstrap - along the lines of your observation;
> it also fixes the specs to actually use the library (so that the tests pass too).
>
> bootstrapped x86_64-darwin12 for c,c++ and fortran (objc and ada bootstraps are broken from other causes).
> [also bootstrapped on x86_64-linux, and checked RUNTESTFLAGS="asan.exp ubsan.exp"]
>
> OK for trunk?
> Iain
I was just about to post something similar; thanks for the patch and sorry
for the breakage. Can't give you formal approval though.
> gcc:
> * config/darwin.h (LINK_COMMAND_SPEC_A): Revise sanitiser specs to
> include sanitise(undefined).
s/sanitise/sanitize/ ;)
Marek
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-31 15:09 ` Iain Sandoe
2013-08-31 15:16 ` Marek Polacek
@ 2013-08-31 21:00 ` Dominique Dhumieres
2013-09-01 11:35 ` Jakub Jelinek
2 siblings, 0 replies; 12+ messages in thread
From: Dominique Dhumieres @ 2013-08-31 21:00 UTC (permalink / raw)
To: jakub, iain; +Cc: polacek, gcc-patches, dominiq
> bootstrapped x86_64-darwin12 for c,c++ and fortran ...
Bootstrapped x86_64-apple-darwin10 for c,c++,fortran,java and
also tested asan.exp and ubsan.exp for gcc and g++.
Thanks for the patch,
Dominique
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-31 15:09 ` Iain Sandoe
2013-08-31 15:16 ` Marek Polacek
2013-08-31 21:00 ` Dominique Dhumieres
@ 2013-09-01 11:35 ` Jakub Jelinek
2 siblings, 0 replies; 12+ messages in thread
From: Jakub Jelinek @ 2013-09-01 11:35 UTC (permalink / raw)
To: Iain Sandoe; +Cc: Dominique Dhumieres, GCC Patches, polacek
On Sat, Aug 31, 2013 at 04:04:03PM +0100, Iain Sandoe wrote:
> OK for trunk?
Ok with the suggested s/sanitise/sanitize/g change.
> gcc:
> * config/darwin.h (LINK_COMMAND_SPEC_A): Revise sanitiser specs to
> include sanitise(undefined).
>
> libsanitiser:
>
> * ubsan/Makefile.am (libubsan_la_LIBADD): Revise to omit libinterception.la
> for Darwin.
> * ubsan/Makefile.in: Regenerate.
>
> Index: gcc/config/darwin.h
> ===================================================================
> --- gcc/config/darwin.h (revision 202118)
> +++ gcc/config/darwin.h (working copy)
> @@ -178,10 +178,11 @@ extern GTY(()) int darwin_ms_struct;
> %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
> %{fopenmp|ftree-parallelize-loops=*: \
> %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
> - %{%:sanitize(address): -lasan } \
> %{fgnu-tm: \
> %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
> %{!nostdlib:%{!nodefaultlibs:\
> + %{%:sanitize(address): -lasan } \
> + %{%:sanitize(undefined): -lubsan } \
> %(link_ssp) %(link_gcc_c_sequence)\
> }}\
> %{!nostdlib:%{!nostartfiles:%E}} %{T*} %{F*} }}}}}}}"
>
> Index: libsanitizer/ubsan/Makefile.am
> ===================================================================
> --- libsanitizer/ubsan/Makefile.am (revision 202118)
> +++ libsanitizer/ubsan/Makefile.am (working copy)
> @@ -18,7 +18,11 @@ ubsan_files = \
> ubsan_value.cc
>
> libubsan_la_SOURCES = $(ubsan_files)
> -libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(LIBSTDCXX_RAW_CXX_LDFLAGS)
> +libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
> +if !USING_MAC_INTERPOSE
> +libubsan_la_LIBADD += $(top_builddir)/interception/libinterception.la
> +endif
> +libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS)
> libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl
>
> # Work around what appears to be a GNU make bug handling MAKEFLAGS
Jakub
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-09-01 11:36 ` Jakub Jelinek
@ 2013-09-01 11:43 ` Marek Polacek
0 siblings, 0 replies; 12+ messages in thread
From: Marek Polacek @ 2013-09-01 11:43 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: David Edelsohn, GCC Patches
On Sun, Sep 01, 2013 at 01:36:37PM +0200, Jakub Jelinek wrote:
> On Sat, Aug 31, 2013 at 05:15:55PM +0200, Marek Polacek wrote:
> > I see, sorry. Will commit the following fix as obvious in a bit.
> >
> > 2013-08-31 Marek Polacek <polacek@redhat.com>
> >
> > * ubsan.c: Include tm_p.h.
>
> You need to add $(TM_P_H) to ubsan.o dependencies in Makefile.in too.
> Ok with that change.
Argh, sorry. I _always_ forgot to update the deps in Makefile.in. :(
Will fix it soon.
Marek
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-31 16:04 ` Marek Polacek
@ 2013-09-01 11:36 ` Jakub Jelinek
2013-09-01 11:43 ` Marek Polacek
0 siblings, 1 reply; 12+ messages in thread
From: Jakub Jelinek @ 2013-09-01 11:36 UTC (permalink / raw)
To: Marek Polacek; +Cc: David Edelsohn, GCC Patches
On Sat, Aug 31, 2013 at 05:15:55PM +0200, Marek Polacek wrote:
> I see, sorry. Will commit the following fix as obvious in a bit.
>
> 2013-08-31 Marek Polacek <polacek@redhat.com>
>
> * ubsan.c: Include tm_p.h.
You need to add $(TM_P_H) to ubsan.o dependencies in Makefile.in too.
Ok with that change.
> --- gcc/ubsan.c.mp 2013-08-31 17:12:48.719219402 +0200
> +++ gcc/ubsan.c 2013-08-31 17:13:05.895281454 +0200
> @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.
> #include "hashtab.h"
> #include "pointer-set.h"
> #include "output.h"
> +#include "tm_p.h"
> #include "toplev.h"
> #include "ubsan.h"
> #include "c-family/c-common.h"
Jakub
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-30 23:22 David Edelsohn
@ 2013-08-31 16:04 ` Marek Polacek
2013-09-01 11:36 ` Jakub Jelinek
0 siblings, 1 reply; 12+ messages in thread
From: Marek Polacek @ 2013-08-31 16:04 UTC (permalink / raw)
To: David Edelsohn; +Cc: GCC Patches
On Fri, Aug 30, 2013 at 06:58:06PM -0400, David Edelsohn wrote:
> This patch / merge broke bootstrap on AIX:
>
> In file included from ./tm.h:18:0,
> from /home/dje/src/src/gcc/function.h:26,
> from /home/dje/src/src/gcc/basic-block.h:25,
> from /home/dje/src/src/gcc/cgraph.h:28,
> from /home/dje/src/src/gcc/ubsan.c:25:
> /home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
> ubsan_type_descriptor(tree)':
> /home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
> 'rs6000_xcoff_strip_dollar' was not declared in this scope
> sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
> (unsigned) (NUM))
> ^
> /home/dje/src/src/gcc/ubsan.c:282:3: note: in expansion of macro
> 'ASM_GENERATE_INTERNAL_LABEL'
> ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_type", type_var_id_num++);
> ^
> /home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
> ubsan_create_data(const char*, location_t, ...)':
> /home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
> 'rs6000_xcoff_strip_dollar' was not declared in this scope
> sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
> (unsigned) (NUM))
>
> If you use macros like ASM_GENERATE_INTERNAL_LABEL, which may cal
> target-specific functions, you need to include tm_p.h to pull in
> <target>-protos.h.
I see, sorry. Will commit the following fix as obvious in a bit.
2013-08-31 Marek Polacek <polacek@redhat.com>
* ubsan.c: Include tm_p.h.
--- gcc/ubsan.c.mp 2013-08-31 17:12:48.719219402 +0200
+++ gcc/ubsan.c 2013-08-31 17:13:05.895281454 +0200
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3.
#include "hashtab.h"
#include "pointer-set.h"
#include "output.h"
+#include "tm_p.h"
#include "toplev.h"
#include "ubsan.h"
#include "c-family/c-common.h"
Marek
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
@ 2013-08-30 23:22 David Edelsohn
2013-08-31 16:04 ` Marek Polacek
0 siblings, 1 reply; 12+ messages in thread
From: David Edelsohn @ 2013-08-30 23:22 UTC (permalink / raw)
To: Marek Polacek; +Cc: GCC Patches
This patch / merge broke bootstrap on AIX:
In file included from ./tm.h:18:0,
from /home/dje/src/src/gcc/function.h:26,
from /home/dje/src/src/gcc/basic-block.h:25,
from /home/dje/src/src/gcc/cgraph.h:28,
from /home/dje/src/src/gcc/ubsan.c:25:
/home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
ubsan_type_descriptor(tree)':
/home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
'rs6000_xcoff_strip_dollar' was not declared in this scope
sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
(unsigned) (NUM))
^
/home/dje/src/src/gcc/ubsan.c:282:3: note: in expansion of macro
'ASM_GENERATE_INTERNAL_LABEL'
ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lubsan_type", type_var_id_num++);
^
/home/dje/src/src/gcc/ubsan.c: In function 'tree_node*
ubsan_create_data(const char*, location_t, ...)':
/home/dje/src/src/gcc/config/rs6000/xcoff.h:262:63: error:
'rs6000_xcoff_strip_dollar' was not declared in this scope
sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX),
(unsigned) (NUM))
If you use macros like ASM_GENERATE_INTERNAL_LABEL, which may cal
target-specific functions, you need to include tm_p.h to pull in
<target>-protos.h.
Thanks, David
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Ubsan merged into trunk
2013-08-30 16:26 Marek Polacek
@ 2013-08-30 18:13 ` Toon Moene
0 siblings, 0 replies; 12+ messages in thread
From: Toon Moene @ 2013-08-30 18:13 UTC (permalink / raw)
To: Marek Polacek; +Cc: GCC Patches
On 08/30/2013 06:14 PM, Marek Polacek wrote:
> I've just merged ubsan into trunk. Please send complaints my way.
> Thanks,
>
> Marek
Just watch the equivalent of this one:
http://gcc.gnu.org/ml/gcc-testresults/2013-08/msg02869.html
tomorrow morning (substitute "java" for "go" and "ubsan" for "asan").
Kind regards,
--
Toon Moene, Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news
^ permalink raw reply [flat|nested] 12+ messages in thread
* Ubsan merged into trunk
@ 2013-08-30 16:26 Marek Polacek
2013-08-30 18:13 ` Toon Moene
0 siblings, 1 reply; 12+ messages in thread
From: Marek Polacek @ 2013-08-30 16:26 UTC (permalink / raw)
To: GCC Patches
I've just merged ubsan into trunk. Please send complaints my way.
Thanks,
Marek
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-09-01 11:43 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 19:40 Ubsan merged into trunk Dominique Dhumieres
2013-08-30 19:51 ` Jakub Jelinek
2013-08-31 15:09 ` Iain Sandoe
2013-08-31 15:16 ` Marek Polacek
2013-08-31 21:00 ` Dominique Dhumieres
2013-09-01 11:35 ` Jakub Jelinek
-- strict thread matches above, loose matches on Subject: below --
2013-08-30 23:22 David Edelsohn
2013-08-31 16:04 ` Marek Polacek
2013-09-01 11:36 ` Jakub Jelinek
2013-09-01 11:43 ` Marek Polacek
2013-08-30 16:26 Marek Polacek
2013-08-30 18:13 ` Toon Moene
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).