unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#20209: GUILE 2.0.11: crash in set_port_filename_x for bytevector ports
@ 2015-03-26 20:18 David Kastrup
  2015-03-26 23:02 ` Mark H Weaver
  0 siblings, 1 reply; 11+ messages in thread
From: David Kastrup @ 2015-03-26 20:18 UTC (permalink / raw)
  To: 20209

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


The following code


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nextbug.c --]
[-- Type: text/x-csrc, Size: 273 bytes --]

#include <libguile.h>

int main()
{
  scm_init_guile ();
  SCM str = scm_c_make_bytevector (0);
  SCM port = scm_open_bytevector_input_port (str, SCM_UNDEFINED);
  scm_set_port_filename_x (port, scm_from_locale_string ("/usr/local/tmp/lilypond/ly/init.ly"));
  return 0;
}

[-- Attachment #3: Type: text/plain, Size: 2392 bytes --]


crashes with the backtrace

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xb7699059 in scm_iprlist () from /usr/lib/libguile-2.0.so.22
(gdb) bt
#0  0xb7699059 in scm_iprlist () from /usr/lib/libguile-2.0.so.22
#1  0xb7699e95 in ?? () from /usr/lib/libguile-2.0.so.22
#2  0xb7699153 in scm_iprlist () from /usr/lib/libguile-2.0.so.22
#3  0xb7699e95 in ?? () from /usr/lib/libguile-2.0.so.22
#4  0xb7699153 in scm_iprlist () from /usr/lib/libguile-2.0.so.22
#5  0xb7699e95 in ?? () from /usr/lib/libguile-2.0.so.22
#6  0xb7698ec9 in scm_prin1 () from /usr/lib/libguile-2.0.so.22
#7  0xb769a606 in scm_simple_format () from /usr/lib/libguile-2.0.so.22
#8  0xb76e5f0b in ?? () from /usr/lib/libguile-2.0.so.22
#9  0xb76e6539 in ?? () from /usr/lib/libguile-2.0.so.22
#10 0xb76e664c in scm_call_with_vm () from /usr/lib/libguile-2.0.so.22
#11 0xb764cc67 in scm_apply () from /usr/lib/libguile-2.0.so.22
#12 0xb764e90e in scm_apply_1 () from /usr/lib/libguile-2.0.so.22
#13 0xb76cdb7b in scm_throw () from /usr/lib/libguile-2.0.so.22
#14 0xb76ce04c in scm_ithrow () from /usr/lib/libguile-2.0.so.22
#15 0xb764b6a3 in scm_error_scm () from /usr/lib/libguile-2.0.so.22
#16 0xb764b778 in scm_error () from /usr/lib/libguile-2.0.so.22
#17 0xb764ba22 in scm_wrong_type_arg () from /usr/lib/libguile-2.0.so.22
#18 0xb76927ca in scm_set_port_filename_x () from /usr/lib/libguile-2.0.so.22
#19 0x08048723 in main () at nextbug.c:8

after outputting

guile: uncaught throw to wrong-type-arg: (set-port-filename! Wrong type argument in position ~A: ~S (1 (Segmentation fault (core dumped)

(by the way: what's up with the non-call of format here?  It's not the
first time I see wrong-type-arg spitting out a format string unmodified)

Compilation was done using
gcc -Wall -ggdb `guile-config compile` nextbug.c `guile-config link` -o nextbug

Version is gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1

platform is
Linux version 3.16.0-33-generic (buildd@brownie) (gcc version 4.9.1 (Ubuntu 4.9.1-16ubuntu6) ) #44-Ubuntu SMP Thu Mar 12 12:25:57 UTC 2015


A few simple experiments for triggering the same crash from Scheme
rather than C were not successful.  That does not necessarily mean much.

It's not hard to guess that this is yet another roadblock on the way to
get LilyPond working with GUILE2.

Any ideas regarding what may be causing this error and how to work
around it?

-- 
David Kastrup

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

end of thread, other threads:[~2017-02-28 13:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 20:18 bug#20209: GUILE 2.0.11: crash in set_port_filename_x for bytevector ports David Kastrup
2015-03-26 23:02 ` Mark H Weaver
2015-03-27  8:18   ` David Kastrup
2015-03-28 18:48     ` Mark H Weaver
2015-03-28 18:21   ` Mark H Weaver
2015-03-29 13:06     ` Ludovic Courtès
2016-06-23 16:34       ` Andy Wingo
2016-06-23 16:59         ` David Kastrup
2016-06-23 18:01           ` Andy Wingo
2016-06-23 18:45             ` David Kastrup
2017-02-28 13:20         ` 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).