unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#24884: Segfault on (mkstemp! "XX" 0)
@ 2016-11-05 18:16 Jean Louis
  2016-11-11 14:06 ` Matt Wette
  2017-01-11 21:33 ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: Jean Louis @ 2016-11-05 18:16 UTC (permalink / raw)
  To: 24884

I was just testing a function, and before I figured out what is
happening, it is segfaulting on:
(mkstemp! "XX" 0)

I don't say, I am using it right. It should not segfault.

Jean

guile (GNU Guile) 2.0.13
Copyright (C) 2016 Free Software Foundation, Inc.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24884: Segfault on (mkstemp! "XX" 0)
  2016-11-05 18:16 bug#24884: Segfault on (mkstemp! "XX" 0) Jean Louis
@ 2016-11-11 14:06 ` Matt Wette
  2017-01-11 21:33 ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Matt Wette @ 2016-11-11 14:06 UTC (permalink / raw)
  To: 24884

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

Please check 24862, which includes a patch: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862>

The issue is that (at least on Mac OS 10.12) mkstemp will only accept specific flags.




[-- Attachment #2: Type: text/html, Size: 625 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24884: Segfault on (mkstemp! "XX" 0)
  2016-11-05 18:16 bug#24884: Segfault on (mkstemp! "XX" 0) Jean Louis
  2016-11-11 14:06 ` Matt Wette
@ 2017-01-11 21:33 ` Andy Wingo
  2017-03-01 13:52   ` Andy Wingo
  1 sibling, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2017-01-11 21:33 UTC (permalink / raw)
  To: Jean Louis; +Cc: 24884

On Sat 05 Nov 2016 19:16, Jean Louis <bugs@gnu.support> writes:

> I was just testing a function, and before I figured out what is
> happening, it is segfaulting on:
> (mkstemp! "XX" 0)
>
> I don't say, I am using it right. It should not segfault.

I agree.  This is a pending topic in Guile.  (The reason, of course:
mutating literal constants is not valid Scheme.  Guile allocates
some constant literals in read-only memory.  Mutating that memory, or
attempting to do so, segfaults, as you have seen.  We should raise an
error instead.)

Andy





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24884: Segfault on (mkstemp! "XX" 0)
  2017-01-11 21:33 ` Andy Wingo
@ 2017-03-01 13:52   ` Andy Wingo
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2017-03-01 13:52 UTC (permalink / raw)
  To: Jean Louis; +Cc: 24884-done

On Wed 11 Jan 2017 22:33, Andy Wingo <wingo@pobox.com> writes:

> On Sat 05 Nov 2016 19:16, Jean Louis <bugs@gnu.support> writes:
>
>> I was just testing a function, and before I figured out what is
>> happening, it is segfaulting on:
>> (mkstemp! "XX" 0)
>>
>> I don't say, I am using it right. It should not segfault.
>
> I agree.  This is a pending topic in Guile.  (The reason, of course:
> mutating literal constants is not valid Scheme.  Guile allocates
> some constant literals in read-only memory.  Mutating that memory, or
> attempting to do so, segfaults, as you have seen.  We should raise an
> error instead.)

Sigh, spoke too soon.  This one turned out to be a rather more ordinary
bug.  Fixed in git on both branches.  Thanks for the report!

Andy





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-01 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-05 18:16 bug#24884: Segfault on (mkstemp! "XX" 0) Jean Louis
2016-11-11 14:06 ` Matt Wette
2017-01-11 21:33 ` Andy Wingo
2017-03-01 13:52   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).