gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
277 stars 61 forks source link

compilation segfaults sometimes #1831

Open brandy125 opened 6 months ago

brandy125 commented 6 months ago

I wrote sometimes because if I cal lit several times it finishes successfully.

What could it be?

during GIMPLE pass: slp
In file included from /home/linux/Downloads/gdl-v1.0.4/src/GDLLexer.hpp:10,
                 from /home/linux/Downloads/gdl-v1.0.4/src/dinterpreter.hpp:30,
                 from /home/linux/Downloads/gdl-v1.0.4/src/overload.cpp:23:
/home/linux/Downloads/gdl-v1.0.4/src/antlr/CharScanner.hpp: In member function 'virtual antlr::RefToken antlr::CharScanner::makeToken(int)':
/home/linux/Downloads/gdl-v1.0.4/src/antlr/CharScanner.hpp:486:26: internal compiler error: Segmentation fault
  486 |         virtual RefToken makeToken(int t)
      |                          ^~~~~~~~~
0x1213b47 internal_error(char const*, ...)
        ???:0
0x154ee85 mark_irreducible_loops()
        ???:0
0x1462ee3 loop_optimizer_init(unsigned int)
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.opensuse.org/> for instructions.
make[2]: *** [src/CMakeFiles/gdl.dir/build.make:1686: src/CMakeFiles/gdl.dir/overload.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

make[1]: *** [CMakeFiles/Makefile2:216: src/CMakeFiles/gdl.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
bash$ 
alaingdl commented 6 months ago

I never had that kind of messages. Do you work on the TGZ 1.0.4 or a clone of the current Git version ? (could confirm gcc version + opensuse version ?)

brandy125 commented 6 months ago

I am working on the TGZ 1.0.4. Here the infos:

bash$ cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20240517"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20240517"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
# CPE 2.3 format, boo#1217921
CPE_NAME="cpe:2.3:o:opensuse:tumbleweed:20240517:*:*:*:*:*:*:*"
#CPE 2.2 format
#CPE_NAME="cpe:/o:opensuse:tumbleweed:20240517"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed"
bash$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure CFLAGS=' -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g' CXXFLAGS=' -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g' XCFLAGS=' -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g' TCFLAGS=' -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g' GDCFLAGS=' -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d,jit,m2 --enable-offload-targets=nvptx-none,amdgcn-amdhsa, --enable-offload-defaulted --without-cuda-driver --enable-host-shared --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/13 --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-13 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-serialization --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.1 20240509 [revision b7a2697733d19a093cbdd0e200ffce069a4bc812] (SUSE Linux) 
bash$ gdl
  GDL - GNU Data Language, Version 1.0.4
- For basic information type HELP,/INFO
- Default library routine search path used (GDL_PATH/IDL_PATH env. var. not set): /usr/local/bin/../share/gnudatalanguage/lib
- Using WxWidgets as graphics library (windows and widgets).
- Using local drivers in /usr/local/bin/../share/gnudatalanguage/drivers
- Please report bugs, feature or help requests and patches at: https://github.com/gnudatalanguage/gdl

% Compiled module: SETUP_KEYS.
GDL> !gdl
{
    "RELEASE": "1.0.4",
    "BUILD_DATE": "May 19 2024",
    "EPOCH": 1716087600,
    "GDL_USE_DSFMT": 1,
    "GDL_USE_WX": 1,
    "GDL_POSIX": 1
}
GDL> 
alaingdl commented 6 months ago

could you try on the Git version ? (git clone https://github.com/gnudatalanguage/gdl)

brandy125 commented 6 months ago

The git version works.

On 20. May 2024, at 12:19, Alain @.***> wrote:

could you try on the Git version ? (git clone https://github.com/gnudatalanguage/gdl)

— Reply to this email directly, view it on GitHub https://github.com/gnudatalanguage/gdl/issues/1831#issuecomment-2120672907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOC5K6BMEGEDUGIGDTPBHLDZDIH6VAVCNFSM6AAAAABH6SSLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRQGY3TEOJQG4. You are receiving this because you authored the thread.

GillesDuvert commented 6 months ago

This is perplexing, the content of src/antlr is never changed.

slayoo commented 6 months ago

Not sure if this applies here, but let's remember that, e.g., in Dabian/Ubuntu packages, our antlr folder is removed and the compilation is done against the system antlr: https://sources.debian.org/patches/gnudatalanguage/1.0.4-1/Build-with-Debian-s-antlr-instead-of-the-embedded-copy-in.patch/