Opened 2 years ago

Closed 2 years ago

Last modified 16 months ago

#1442 closed defect (fixed)

file-copy in compiled code causes segfaults

Reported by: sjamaan Owned by: sjamaan
Priority: major Milestone: 5.1
Component: core libraries Version: 4.13.0
Keywords: segfault, file-copy Cc: sirkmatija@…
Estimated difficulty: easy

Description

Reported by "sikmatija" on IRC:

(use files)
(file-copy "/home/peter/test.txt" "/tmp/lala" #t)

Works in csi, but when compiled, causes a segfault. Wrapping it in eval does not help.

Change History (5)

comment:1 Changed 2 years ago by sjamaan

Note: It works without issue in CHICKEN 5, but that doesn't mean the underlying bug isn't there (like in CHICKEN 4 it works in csi, which makes no sense either)

comment:2 Changed 2 years ago by LemonBoy

With my detective hat on I'd say it's because read-string! is defined in extras but files doesn't import it.

comment:3 Changed 2 years ago by evhan

Patch posted for CHICKEN 4.

It works in csi because csi loads extras implicitly.

It works in CHICKEN 5 because the dependencies are correct.

comment:4 Changed 2 years ago by Kooda

Resolution: fixed
Status: newclosed

Pushed as 50e934e1df9f2f584f88c9f3477030203b01bb77 in the chicken-4 branch.

comment:5 Changed 16 months ago by sjamaan

Milestone: 4.14.05.1

Ticket retargeted after milestone deleted

Note: See TracTickets for help on using tickets.