Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core dump after bootstrap #450

Closed
alfonsodg opened this issue Jun 23, 2019 · 6 comments
Closed

Core dump after bootstrap #450

alfonsodg opened this issue Jun 23, 2019 · 6 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@alfonsodg
Copy link

alfonsodg commented Jun 23, 2019

Hi,

I just follow the steps to get and compile, however when arrives to: ./vc -o v . launches a coredump. I have test the vc binary and apparently opens the interpreter.

My OS:
Linux 5.1.8-1-MANJARO #1 SMP PREEMPT Sun Jun 9 20:44:14 UTC 2019 x86_64 GNU/Linux

GCC:
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto

Core Dump:
PID: 28556 (vc)
UID: 1000 (alfonsodg)
GID: 1000 (alfonsodg)
Signal: 11 (SEGV)
Timestamp: Sun 2019-06-23 08:10:14 -05 (4min 45s ago)
Command Line: ./vc -o v .
Executable: /home/alfonsodg/code/v/compiler/vc
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (alfonsodg)
Boot ID: 1a5d9df51c8a493c8716db7570dc1e25
Machine ID: f8a0ff9057ad4496a2d4ed01ca9071ad
Hostname: aldebaran
Storage: /var/lib/systemd/coredump/core.vc.1000.1a5d9df51c8a493c8716db7570dc1e25.28556.1561295414000000.lz4
Message: Process 28556 (vc) of user 1000 dumped core.

            Stack trace of thread 28556:
            #0  0x00007f3d170b73bf _IO_fgets (libc.so.6)
            #1  0x0000557980a517e7 n/a (/home/alfonsodg/code/v/compiler/vc)

lines 1-21...skipping...
PID: 28556 (vc)
UID: 1000 (alfonsodg)
GID: 1000 (alfonsodg)
Signal: 11 (SEGV)
Timestamp: Sun 2019-06-23 08:10:14 -05 (4min 45s ago)
Command Line: ./vc -o v .
Executable: /home/alfonsodg/code/v/compiler/vc
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (alfonsodg)
Boot ID: 1a5d9df51c8a493c8716db7570dc1e25
Machine ID: f8a0ff9057ad4496a2d4ed01ca9071ad
Hostname: aldebaran
Storage: /var/lib/systemd/coredump/core.vc.1000.1a5d9df51c8a493c8716db7570dc1e25.28556.1561295414000000.lz4
Message: Process 28556 (vc) of user 1000 dumped core.

            Stack trace of thread 28556:
            #0  0x00007f3d170b73bf _IO_fgets (libc.so.6)
            #1  0x0000557980a517e7 n/a (/home/alfonsodg/code/v/compiler/vc)
            #2  0x0000557980a5d479 n/a (/home/alfonsodg/code/v/compiler/vc)
            #3  0x0000557980a5cb7a n/a (/home/alfonsodg/code/v/compiler/vc)
            #4  0x0000557980a5bd4c n/a (/home/alfonsodg/code/v/compiler/vc)
            #5  0x00007f3d1706ace3 __libc_start_main (libc.so.6)
            #6  0x0000557980a4b39e n/a (/home/alfonsodg/code/v/compiler/vc)

gdb bt:
#0 0x00007f3d170b73bf in fgets () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007f3d170b73bf in fgets () from /usr/lib/libc.so.6
#1 0x0000557980a517e7 in os.system ()
#2 0x0000557980a5d479 in V_cc ()
#3 0x0000557980a5cb7a in V_compile ()
#4 0x0000557980a5bd4c in main ()

@trumae
Copy link

trumae commented Jun 23, 2019

me too!

@shaoxie1986
Copy link

shaoxie1986 commented Jun 23, 2019

my os is MANJARO too, I use:
gcc -w -lgcc_s -o vc v.c
to compile v.c. there's no crash, but I don't known why.

my gcc is 8.3.0

@oxy oxy added the segfault label Jun 23, 2019
@oxy
Copy link

oxy commented Jun 23, 2019

On Arch Linux here, unable to reproduce - can you update your repo and redownload v.c and try again?

@alfonsodg
Copy link
Author

my os is MANJARO too, I use:
gcc -w -lgcc_s -o vc v.c
to compile v.c. there's no crash, but I don't known why.

my gcc is 8.3.0

Got it!!! Nice tweak... cc is not working but gcc do the right work! Unless delays to compile in comparison with cc

@alfonsodg
Copy link
Author

On Arch Linux here, unable to reproduce - can you update your repo and redownload v.c and try again?

I have the last update, however there is a problem with cc and the compilation flags apparently

@alfonsodg
Copy link
Author

A more extended explanation and solution in the #460

@medvednikov medvednikov added the Bug This tag is applied to issues which reports bugs. label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

5 participants