Message ID | 20121205184312.GA20405@bromo.med.uc.edu |
---|---|
State | New |
Headers | show |
On Dec 5, 2012, at 10:43 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote: > The transition of libasan on darwin from using mach_override to the replacement mac function > imposition code results in a non-functional static libasan (PR55599). Ok unless the asan people have a better idea...
In fact nothing prevents GCC from having a linkable static ASan runtime. The reason for the static library being unusable is not in the dynamic runtime itself, but in mach_override not working well with other GCC libraries (it is unable to parse some function prologues). Because ASan is transitioning to the dynamic runtime in LLVM, it's unlikely we'll put any effort into fixing mach_override. On Thu, Dec 6, 2012 at 1:23 AM, Mike Stump <mikestump@comcast.net> wrote: > On Dec 5, 2012, at 10:43 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote: >> The transition of libasan on darwin from using mach_override to the replacement mac function >> imposition code results in a non-functional static libasan (PR55599). > > Ok unless the asan people have a better idea...
On Thu, Dec 6, 2012 at 10:38 AM, Alexander Potapenko <glider@google.com> wrote: > In fact nothing prevents GCC from having a linkable static ASan runtime. Except (as Alex mentions) we are not going to support it. I'll apply this patch later (~today). --kcc > The reason for the static library being unusable is not in the dynamic > runtime itself, but in mach_override not working well with other GCC > libraries (it is unable to parse some function prologues). Because > ASan is transitioning to the dynamic runtime in LLVM, it's unlikely > we'll put any effort into fixing mach_override. > > On Thu, Dec 6, 2012 at 1:23 AM, Mike Stump <mikestump@comcast.net> wrote: >> On Dec 5, 2012, at 10:43 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote: >>> The transition of libasan on darwin from using mach_override to the replacement mac function >>> imposition code results in a non-functional static libasan (PR55599). >> >> Ok unless the asan people have a better idea... > > > > -- > Alexander Potapenko > Software Engineer > Google Moscow
Done, r194257. On Thu, Dec 6, 2012 at 12:04 PM, Konstantin Serebryany <konstantin.s.serebryany@gmail.com> wrote: > On Thu, Dec 6, 2012 at 10:38 AM, Alexander Potapenko <glider@google.com> wrote: >> In fact nothing prevents GCC from having a linkable static ASan runtime. > > Except (as Alex mentions) we are not going to support it. > I'll apply this patch later (~today). > > --kcc > >> The reason for the static library being unusable is not in the dynamic >> runtime itself, but in mach_override not working well with other GCC >> libraries (it is unable to parse some function prologues). Because >> ASan is transitioning to the dynamic runtime in LLVM, it's unlikely >> we'll put any effort into fixing mach_override. >> >> On Thu, Dec 6, 2012 at 1:23 AM, Mike Stump <mikestump@comcast.net> wrote: >>> On Dec 5, 2012, at 10:43 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote: >>>> The transition of libasan on darwin from using mach_override to the replacement mac function >>>> imposition code results in a non-functional static libasan (PR55599). >>> >>> Ok unless the asan people have a better idea... >> >> >> >> -- >> Alexander Potapenko >> Software Engineer >> Google Moscow
Index: libsanitizer/configure.ac =================================================================== --- libsanitizer/configure.ac (revision 194225) +++ libsanitizer/configure.ac (working copy) @@ -81,7 +81,7 @@ unset TSAN_SUPPORTED AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"]) case "$host" in - *-*-darwin*) MAC_INTERPOSE=true ;; + *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;; *) MAC_INTERPOSE=false ;; esac AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) Index: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 194224) +++ gcc/config/darwin.h (working copy) @@ -180,9 +180,7 @@ 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 } } \ - %{fsanitize=address: \ - %{static|static-libasan|static-libgcc|static-libgfortran: -framework CoreFoundation -lstdc++ libasan.a%s; \ - static-libstdc++: -framework CoreFoundation libstdc++.a%s libasan.a%s; : -framework CoreFoundation -lasan } } \ + %{fsanitize=address: -framework CoreFoundation -lasan } \ %{fgnu-tm: \ %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \ %{!nostdlib:%{!nodefaultlibs:\