public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/108021] New: sanitizer used with qemu
@ 2022-12-08 12:44 laurent.alfonsi at linaro dot org
  2022-12-08 19:45 ` [Bug sanitizer/108021] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: laurent.alfonsi at linaro dot org @ 2022-12-08 12:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108021

            Bug ID: 108021
           Summary: sanitizer used with qemu
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: laurent.alfonsi at linaro dot org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Hi,

I m running gcc testsuite with qemu, and I am facing an issue in sanitizer.

Before (12.x), the asan was incompatible with ptrace.
   $ cat emtpy.c
    int main(void) { return 0; }

   $ aarch64-linux-gnu-gcc emtpy.c -fsanitize=address

   $ qemu-aarch64 -L ./sysroot-with-libasan-from-release ./a.out
    ==135765==LeakSanitizer has encountered a fatal error.
    ==135765==HINT: For debugging, try setting environment variable
LSAN_OPTIONS=verbosity=1:log_threads=1
    ==135765==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
      # fiishes quickly : return status=1


Now (13.x), 
   $ qemu-aarch64 -L ./sysroot-with-libasan-from-master-branch ./a.out
      # RAM memory grows exponentially without message

It happens of course on most asan-dg.exp tests

Either, it has been changed and not incompatible anymore with ptrace, or the
error message was removed by error.

It happens of course on most asan-dg.exp tests. 
Is this supposed to work now ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/108021] sanitizer used with qemu
  2022-12-08 12:44 [Bug sanitizer/108021] New: sanitizer used with qemu laurent.alfonsi at linaro dot org
@ 2022-12-08 19:45 ` pinskia at gcc dot gnu.org
  2022-12-08 19:47 ` pinskia at gcc dot gnu.org
  2022-12-11  9:12 ` laurent.alfonsi at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-08 19:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108021

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540024.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/108021] sanitizer used with qemu
  2022-12-08 12:44 [Bug sanitizer/108021] New: sanitizer used with qemu laurent.alfonsi at linaro dot org
  2022-12-08 19:45 ` [Bug sanitizer/108021] " pinskia at gcc dot gnu.org
@ 2022-12-08 19:47 ` pinskia at gcc dot gnu.org
  2022-12-11  9:12 ` laurent.alfonsi at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-08 19:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108021

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have not tried the trunk with these patches though. The patches I did were
for GCC 10.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/108021] sanitizer used with qemu
  2022-12-08 12:44 [Bug sanitizer/108021] New: sanitizer used with qemu laurent.alfonsi at linaro dot org
  2022-12-08 19:45 ` [Bug sanitizer/108021] " pinskia at gcc dot gnu.org
  2022-12-08 19:47 ` pinskia at gcc dot gnu.org
@ 2022-12-11  9:12 ` laurent.alfonsi at linaro dot org
  2 siblings, 0 replies; 4+ messages in thread
From: laurent.alfonsi at linaro dot org @ 2022-12-11  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108021

laurent.alfonsi at linaro dot org <laurent.alfonsi at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from laurent.alfonsi at linaro dot org <laurent.alfonsi at linaro dot org> ---
I have tested with future merged branch of qemu 
  https://gitlab.com/stsquad/qemu/-/commits/review/linux-user-vma-v2

and it fail properly 
  $ qemu-aarch64  -L sysroot-with-libasan-from-master-branch  ./a.out
  AddressSanitizer: CHECK failed: asan_poisoning.cpp:38 "((AddrIsInMem(addr)))
!= (0)" (0x0, 0x0) (tid=16754)
    <empty stack>

The RAM memory doesn't grow continuously anymore.

From my pov, it is fair. This issue that will be fixed when merging the qemu
branch.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-11  9:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-08 12:44 [Bug sanitizer/108021] New: sanitizer used with qemu laurent.alfonsi at linaro dot org
2022-12-08 19:45 ` [Bug sanitizer/108021] " pinskia at gcc dot gnu.org
2022-12-08 19:47 ` pinskia at gcc dot gnu.org
2022-12-11  9:12 ` laurent.alfonsi at linaro dot org

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).