metaeducation / rebol-issues

6 stars 1 forks source link

On OSX - crashes when loading a binary longer than 32262 bytes #1677

Open rebolbot opened 14 years ago

rebolbot commented 14 years ago

Submitted by: PeterWood

R3 crashes with a segmentation fault when a binary string over 32262 bytes is loaded. The string is a compressed version of Ladislav's core-tests.r

>> do %dump2.txt ;; compressed file manually shortened
Script: "Untitled" Version: none Date: none
== #{
789CD4BD6B631BB99128FA59FE15ED967C6C65D254779314254E1C6732F19CDD
CD63F6CC2477CFAE2EF7DE96D8B2B843910A49D97274757EFB45158042E1D50F
CA93DD753236BB5055281480C2AB809A57BB6AF7F9AEDE9E5457BBC57A35D8BC
B890BFDE25D3EA723B7B71B15AEF120D2A663AF965F23601428DF628C1DBA4DA
D488FEB17E7A71B8195E6DAAEDCD8B8B2279FB3699AF934D3DBFBFAA930B204A
B262367B3127092E17AB6AF3192490BFDE25878F79FEA444D0301041FE362268
BC1707DBCFDB5D7D7BB2BE436114CBECB2DAD6D3A47C719096802AFF3CA520D3
ED7A3997F42F5A199C8E0487D3D1E1E337E28F438E...

>> length? file
== 32262

>> do %dump2.txt  ;; file lengthened by one byte
Segmentation fault

The complete compressed script file is attached - dump.txt

CC - Data [ Version: alpha 99 Type: Bug Platform: Mac OSX Category: Native Reproduce: Always Fixed-in:none ]

rebolbot commented 14 years ago

Submitted by: PeterWood

Note: the binary string loads correctly if trace is set on.

rebolbot commented 14 years ago

Submitted by: BrianH

The compressed script file is not attached yet. And you might want to use a different extension: .txt is a registered file type in more recent builds. If the problem goes away when you change the file extension, that would be really interesting to know.

rebolbot commented 14 years ago

Submitted by: PeterWood

The file is attached now.

rebolbot commented 14 years ago

Submitted by: PeterWood

The contents of the dump.txt file were dumped during debugging as the problem occurred in an Rebol.org LDS script which obtains the binary data from Rebol.org. I changed the file extension to .r anyway and the problem is the same - seg fault unless you set trace on.

rebolbot commented 10 years ago

Submitted by: abolka

While I can still reproduce this crash with A109, I can no longer reproduce it with the attached dump.txt on A110, A111 or current open source builds.