https://bugs.kde.org/show_bug.cgi?id=483711

            Bug ID: 483711
           Summary: -m32 flag "impossible" happens
    Classification: Developer tools
           Product: valgrind
           Version: 3.16.1
          Platform: unspecified
                OS: Unspecified
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: railway_bylaws...@icloud.com
  Target Milestone: ---

SUMMARY

I wanted to debug 32bit compiled code on my x86-64 container (Docker) installed
on my ARM64 machine, but unfortunately, after compiling with gcc and the
appropriate flags (-m32, -g), I get the following error message from valgrind:

==961== Memcheck, a memory error detector
==961== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==961== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==961== Command: ./test
==961==

valgrind: m_scheduler/scheduler.c:1704 (vgPlain_scheduler): the 'impossible'
happened.
valgrind: VG_(scheduler), phase 3: run_innerloop detected host state invariant
failure

host stacktrace:
==961==    at 0x5803EF67: ??? (in
/usr/lib/x86_64-linux-gnu/valgrind/memcheck-x86-linux)
==961==    by 0x5803F090: ??? (in
/usr/lib/x86_64-linux-gnu/valgrind/memcheck-x86-linux)
==961==    by 0x5803F184: ??? (in
/usr/lib/x86_64-linux-gnu/valgrind/memcheck-x86-linux)
==961==    by 0x5809FEF0: ??? (in
/usr/lib/x86_64-linux-gnu/valgrind/memcheck-x86-linux)
==961==    by 0x580F5F22: ??? (in
/usr/lib/x86_64-linux-gnu/valgrind/memcheck-x86-linux)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable (lwpid 961)
==961==    at 0x40023FD: handle_preload_list (rtld.c:902)
==961==    by 0x4005541: dl_main (rtld.c:1735)
==961==    by 0x401A055: _dl_sysdep_start (dl-sysdep.c:252)
==961==    by 0x4001FEC: _dl_start_final (rtld.c:485)
==961==    by 0x4001FEC: _dl_start (rtld.c:575)
==961==    by 0x40010BA: ??? (in /lib/i386-linux-gnu/ld-2.31.so)
client stack range: [0x3F7FF000 0x3F800FFF] client SP: 0x3F7FFA20
valgrind stack range: [0x22FA6000 0x230A5FFF] top usage: 5676 of 1048576

This doesn't happen whenever I compile without the -m32 flag. I have tried to
replicate the issue with both ubuntu and debian and the issue persists.
I have read the documentation to find anything pointing me to the right
direction but I haven't found anything helpful, I am afraid this is a bug
unfortunately.

STEPS TO REPRODUCE
(Given you are inside a Docker container)
1. Compile any .c file using gcc and the -m32 flag
2. Run valgrind

OBSERVED RESULT
the "impossible" happened

EXPECTED RESULT
Successful debugging session

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to