This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66805] New: Crash in gcov_exit when combining --coverage, C++, #pragma pack


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

            Bug ID: 66805
           Summary: Crash in gcov_exit when combining --coverage, C++,
                    #pragma pack
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jengelh at inai dot de
                CC: rguenther at suse dot de
  Target Milestone: ---

Observed: When building in C++ mode, combined with #pragma pack(1), combined
with --coverage, there is a crash somewhere in gcov_exit.

$ cat MF
#!/bin/sh
echo 'void foo(void){}' >pack.cpp
echo '#pragma pack(1)' >>pack.cpp
echo 'int main(void){return 0;}' >t.cpp
g++ --coverage pack.cpp -shared -fPIC -o pack.so
g++ --coverage t.cpp -o t ./pack.so
./t

$ sh MF
MF: line 7: 22909 Segmentation fault      ./t

$ gcc -v
gcc version 4.8.5 (SUSE Linux) 
Also happens with:
gcc version 5.1.1 20150609 [gcc-5-branch revision 224273] (SUSE Linux) 
(platform is an openSUSE 13.2 x86_64 with the compilers provided by
/devel:/gcc)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]