Opened 5 years ago
Closed 5 years ago
#1631 closed defect (fixed)
srfi-13 string-pad segfaults when arguments are not of the right type
Reported by: | Kooda | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 5.2 |
Component: | extensions | Version: | |
Keywords: | srfi-13 | Cc: | |
Estimated difficulty: |
Description
This little piece of code causes a segfault (easy mistake to make, arguments order is reversed).
(import srfi-13) (string-pad "coucou" #\space 10)
Change History (5)
comment:1 Changed 5 years ago by
Milestone: | someday → 5.2 |
---|
comment:2 Changed 5 years ago by
comment:3 Changed 5 years ago by
I've fixed srfi-13 to use ##sys#check-fixnum
but there are other eggs still using it:
- sequences
- object-evict
- srfi-1
- srfi-14
- srfi-18
- srfi-69
- vector-lib
comment:4 Changed 5 years ago by
I've updated the eggs now too. This ticket can be closed when core is patched to mark it as obsolete and remove uses in pointer-vector-ref/set!
comment:5 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed with 29b3d6113985e2f110698d8ab7f398f51a88a819
Note: See
TracTickets for help on using
tickets.
This is a bug in
##sys#check-exact
. It will fail anywhere it's used. In core there's currently two places remaining that use it: pointer-vector-ref and pointer-vector-set!Actually, I think all these uses are bogus: an exact complex number is not a valid index into a vector or string. So probably it's better to get rid of
##sys#check-exact
altogether.