Skip to content

SDL1 port segfaults on the Open Pandora (ARMv7 TI Cortex-A8) #23

@sviscapi

Description

@sviscapi

Hi all,

I just gave the updated master branch a try, as I couldn't apply @wasamasa 's SDL1.2 patch into my local copy of @mntmn 's reform branch (git apply just didn't work).

Good news: compilation no longer crashes on the Pandora :)

cc -g -o sledge --std=gnu99 -Wall -O1 -I. ${CFLAGS} sledge.c reader.c writer.c alloc.c strmap.c stream.c ../devices/sdl.c ../devices/posixfs.c -lm -lSDL -DCPU_ARM -DDEV_SDL -DDEV_POSIXFS

Bad news: the resulting binary still segfaults when trying to run tests/boot2.l. I can see an empty black SDL window (I set the height to 480 in sdl.c btw), but that's it.

/media/Pandora1/dev/interim/sledge$ gdb --args ./sledge tests/boot2.l

[alloc] cell heap at 0x40531008, 1200000 bytes reserved
[compiler] interim knows 55 symbols. enter (symbols) to see them.
[fs] mounted: /framebuffer
[fs] mounted: /keyboard
[fs] mounted: /sd
[open] via /sd: /sd/os/lib.l
[posixfs] trying to read file of len 3323...
[open] via /sd: /sd/os/gfx.l
[posixfs] trying to read file of len 8267...
[mmap] found matching fs: /framebuffer for path: /framebuffer
[open] via /framebuffer: /framebuffer/width
[open] via /framebuffer: /framebuffer/height
[open] via /framebuffer: /framebuffer/depth
("[gfx] fb " (surface 800 480 1 1600 0 0 [ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff] ))
[open] via /framebuffer: /framebuffer
[open] via /sd: /sd/unifont.bin
[posixfs] trying to read file of len 3014656...
[open] via /sd: /sd/os/shell.l
[posixfs] trying to read file of len 6718...
[open] via /keyboard: /keyboard
[open] via /sd: /sd/os/mouse.l
[posixfs] trying to read file of len 1033...

Program received signal SIGSEGV, Segmentation fault.
0x40a4f058 in ?? ()
(gdb) bt
#0 0x40a4f058 in ?? ()
#1 0x40a534e4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Could this crash be related to the fact that the master branch lacks (AFAIK) the latest commits on the reform branch (i.e even a simple (+ 1 1) crashes on my end)

Could you please have a look ?

Cheers, Sam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions