Opened 9 months ago

Closed 6 months ago

#1442 closed defect (fixed)

file-copy in compiled code causes segfaults

Reported by: sjamaan Owned by: sjamaan
Priority: major Milestone: 4.14.0
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 (4)

comment:1 Changed 9 months 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 8 months 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 6 months 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 6 months ago by kooda

  • Resolution set to fixed
  • Status changed from new to closed

Pushed as 50e934e1df9f2f584f88c9f3477030203b01bb77 in the chicken-4 branch.

Note: See TracTickets for help on using tickets.