@mflatt If I cast a _pointer
to (_bytes o N)
for some appropriate length, will the collector potentially move the storage for that value?
@pnwamk Did we have errors in the math library at some point about Sequenceof
vs Listof
?
That’s what seems to have happened to @asumu for the PPA build
See https://launchpadlibrarian.net/304193846/buildlog_ubuntu-precise-i386.racket_6.8-1~precise1~ppa1_BUILDING.txt.gz and search for “Type Check”
Yes, the value produced for (_bytes o N)
will have a copy of the content of the original _pointer
, and that copy can move
@mflatt Then mutating the resulting bytes object will not alter the storage backing the _pointer object?
Right
If you want that, use make-sized-byte-string
nothing with those two together comes to mind…
@asumu is this a consistent build error? Or an intermittent (possible nondeterministic?) one?
@pnwamk: it happened for two builds (precise and trusty) but I haven’t tried to reproduce it otherwise. It didn’t happen on any of the other three builds.
off the top of our heads, is there something that is different for those builds than for others?
(Going to be AFK for a while)
k
Might be a 32/64 bit difference but not sure.
okay, thanks.
I’ve got a 32-bit Ubuntu install and I think I’ve reproduced the issue… will report more later
it appears to be a non-deterministic failure
Can you open an issue to track it?
@mflatt will the lack of null termination be a problem?
It can’t really be helped since this pointer is the result of mmap
@samth Probably not, as long as you don’t try to pass it to a C function as a string
OK, great
It’s difficult to make any guarantees, which is why the docs for make-sized-byte-string
don’t really try
I just wasn’t sure if the vagueness meant that it will probably work but we don’t make any promises, or that it probably won’t work except by accident
its fixed
my bad, guys
@pnwamk thanks! Packages built successfully this time.