www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19116] New: dmd compiles binary but segfaults immediately

https://issues.dlang.org/show_bug.cgi?id=19116

          Issue ID: 19116
           Summary: dmd compiles binary but segfaults immediately when run
                    on Ubuntu / Debian 32Bit architectures
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: alex.braunegg gmail.com

As the current maintainer for the Linux OneDrive client
(https://github.com/abraunegg/onedrive) a number of users are unable to run the
compiled binary when it is compiled and run on 32 bit architectures. 

Examples of runtime failures on various operating systems are:


https://github.com/skilion/onedrive/issues/385

OS: Lubunti 386
https://github.com/skilion/onedrive/issues/353


GNU/Linux
https://github.com/skilion/onedrive/issues/336


i686 i686 i686 GNU/Linux
https://github.com/abraunegg/onedrive/issues/79

The process to build the binary is the same:

sudo apt install build-essential
sudo apt install libcurl4-openssl-dev
sudo apt install libsqlite3-dev
curl -fsS https://dlang.org/install.sh | bash -s dmd
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
source ~/dlang/dmd-2.081.1/activate
make
sudo make install

With no errors being reported at compilation time. A full stack trace has been
provided here:

https://github.com/skilion/onedrive/files/2155548/strace.txt

When using the exact same process on x86_64, there are no runtime issues on
Ubuntu / Debian platforms.

When the DMD reference compiler is swapped out for LDC on Ubuntu / Debian 32bit
platforms the resulting binary runs without issue.

Any suggestions here would be greatly appreciated.

--
Jul 25 2018