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

Fix IRIX pathconf() syscall #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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

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