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

pspld.exe segfault #69

Open
mkst opened this issue Feb 11, 2024 · 0 comments
Open

pspld.exe segfault #69

mkst opened this issue Feb 11, 2024 · 0 comments

Comments

@mkst
Copy link
Contributor

mkst commented Feb 11, 2024

Using this branch because pspld requires a couple of extra functions, running pspld.exe results in a segfault.

I've attached a log: wibo.log

sudo ~/github/wibo/build/wibo pspsnc.exe -c -v test.c -o test.o
sudo WIBO_DEBUG=1 ~/github/wibo/build/wibo pspld.exe test.o 2> wibo.log

The test.c is just:

int my_func(int x) {
	return x * 100;
}

pspld.exe also segfaults with no arguments.. and I actually get a segfault with wine too. damn.

pspld 2.7.63.0 @ Z:\home\mark\github\decomp.me\backend\compilers\psp\pspsnc_1.2.7503.0\pspld.exe
...
Internal Linker Exception: dump file written to C:\users\mark\Temp\pspld2.7.63.0.dmp

Running it via pspsnc.exe gets further with wine, but segfaults with wibo:

$ wine pspsnc.exe -v test.c -o out.elf
DOING: Z:/home/mark/github/decomp.me/backend/compilers/psp/pspsnc_1.2.7503.0/pspcq -XYc=mixed+gnu_ext --display_error_number -D__CONTROL__ -D__SNC__ -Dunix -Dmips -Dhost_mips -DMIPSEL -DLANGUAGE_C -D_R40
00 -D__R4000 -D__R4000__ -D__PSP__ -D__psp__ -D__SCE_LIB_DECLARE_BY_C -DSCE_ALLEGREX_USE_BUILTIN -D_mips=2 -D__mips=2 -D_MIPSEL -D__MIPSEL -D__MIPSEL__ -IZ:/home/mark/github/decomp.me/backend/compilers/p
sp/pspsnc_1.2.7503.0/../include_snc -IZ:/home/mark/github/decomp.me/backend/compilers/psp/pspsnc_1.2.7503.0/../include -JZ:/home/mark/github/decomp.me/backend/compilers/psp/pspsnc_1.2.7503.0/../include_s
nc -JZ:/home/mark/github/decomp.me/backend/compilers/psp/pspsnc_1.2.7503.0/../include -s C:\users\mark\Temp\SNC32_0.s -d C:\users\mark\Temp\SNC32_0.D -f test.c test.c
Deleting C:\users\mark\Temp\SNC32_0.D
DOING: Z:/home/mark/github/decomp.me/backend/compilers/psp/pspsnc_1.2.7503.0/pspas -G0 -o test.o C:\users\mark\Temp\SNC32_0.s
Deleting C:\users\mark\Temp\SNC32_0.s
DOING: Z:/home/mark/github/decomp.me/backend/compilers/psp/pspsnc_1.2.7503.0/pspld @ldRac7f.tmp
pspld 2.7.63.0 @ Z:\home\mark\github\decomp.me\backend\compilers\psp\pspsnc_1.2.7503.0\pspld.exe
Command line : error: L0032:Could not open file "libsncpp.a"
Command line : error: L0064:Linking aborted
Deleting .\ldRac7f.tmp
Deleting test.o
Deleting C:\users\mark\Temp\SNC32_0.s

vs

wibo pspsnc.exe -v test.c -o out.elf
Segmentation fault (core dumped)

At this point in time I dont really care about linking (just compiling and assembling), but it would be interesting to understand what's going wrong.

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

No branches or pull requests

1 participant