Skip to content

Conversation

cadmic
Copy link

@cadmic cadmic commented Aug 6, 2024

Currently pathconf() always errors in qemu, and when running IDO with -g3 this causes it to allocate to a heap buffer with a size too small. When the compiler encounters a long path name it overflows this buffer, which can corrupt the heap and eventually lead to a segfault. Currently this prevents OOT retail versions from building with qemu-irix.

I some trouble getting this to build on modern Ubuntu. I updated a submodule path in this PR, and also had to install python2 manually. Full steps (from https://ubuntuforums.org/showthread.php?t=2486174&p=14140057#post14140057):

wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
sudo tar xzf Python-2.7.9.tgz
cd Python-2.7.9
sudo ./configure --enable-optimizations
sudo make altinstall

Then to build qemu-irix:

./configure --target-list=irix-linux-user --disable-werror --python=/usr/local/bin/python2.7
make
sudo make install

cadmic pushed a commit to cadmic/qemu-irix that referenced this pull request Feb 19, 2025
Implement sysconf(_SC_ARG_MAX) syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant