Paste number 143106: guile-gnome corba test fail

Index of paste annotations: 1 | 2 | 3 | 4 | 5 | 6

Paste number 143106: guile-gnome corba test fail
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6
Channel:None
Paste contents:
Raw Source | XML | Display As
Here is the git diff:

diff --git a/corba/gnome/corba/guile-gnome-corba-types.c b/corba/gnome/corba/guile-gnome-corba-types.c
index b23381b..3bde4fc 100644
--- a/corba/gnome/corba/guile-gnome-corba-types.c
+++ b/corba/gnome/corba/guile-gnome-corba-types.c
@@ -821,8 +821,7 @@ scm_init_gnome_corba_types (void)
 
     gsubr = scm_c_make_gsubr ("%print-corba-struct", 2, 0, 0, print_corba_struct);
     scm_corba_struct_vtable = scm_permanent_object
-        (scm_make_vtable_vtable (scm_from_locale_string ("srprprprpopopW"),
-                                scm_from_int (0), SCM_LIST1 (gsubr)));
+        (scm_make_vtable (scm_from_locale_string ("srprprprpopopW"), SCM_LIST1 (gsubr)));
     SCM_SET_CORBA_STRUCT_TYPECODE (scm_corba_struct_vtable, TC_CORBA_TypeCode);
     scm_c_define ("%corba-struct-vtable", scm_corba_struct_vtable);
     scm_c_define ("%corba-struct-vtable-offset-user", scm_from_int (scm_corba_struct_vtable_offset_user));
@@ -830,8 +829,7 @@ scm_init_gnome_corba_types (void)
 
     gsubr = scm_c_make_gsubr ("%print-corba-sequence", 2, 0, 0, print_corba_sequence);
     scm_corba_sequence_vtable = scm_permanent_object
-        (scm_make_vtable_vtable (scm_from_locale_string ("srprprprpopW"),
-                                scm_from_int (0), SCM_LIST1 (gsubr)));
+        (scm_make_vtable (scm_from_locale_string ("srprprprpopW"), SCM_LIST1 (gsubr)));
     SCM_SET_CORBA_SEQUENCE_TYPECODE (scm_corba_sequence_vtable, TC_CORBA_TypeCode);
     scm_c_define ("%corba-sequence-vtable", scm_corba_sequence_vtable);
     scm_c_define ("%corba-sequence-vtable-offset-user", scm_from_int (scm_corba_sequence_vtable_offset_user));

_but_ it crashes the corba test suite:

make[2]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
make  check-TESTS
make[3]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
make[4]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
../../build-aux/test-driver: line 107: 27259 Segmentation fault      "$@" > $log_file 2>&1
FAIL: wrapset.scm
make[5]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
============================================================================
Testsuite summary for guile-gnome-platform 2.16.2
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See corba/tests/test-suite.log
============================================================================
Makefile:581: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
Makefile:687: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
make[3]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
Makefile:753: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
Makefile:389: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba'
Makefile:446: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
david@capac:/usr/local/src/guile-gnome/git-clone 280 $ 

Annotations for this paste:

Annotation number 1: corba check fails
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6/1
Paste contents:
Raw Source | Display As
I'd like to get rid of guile's deprecated messages in guile-gnome.  It only concerns guile-gnome-corba-types.c

Here is the git diff I propose:

diff --git a/corba/gnome/corba/guile-gnome-corba-types.c b/corba/gnome/corba/guile-gnome-corba-types.c
index b23381b..26e41b1 100644
--- a/corba/gnome/corba/guile-gnome-corba-types.c
+++ b/corba/gnome/corba/guile-gnome-corba-types.c
@@ -819,19 +819,17 @@ scm_init_gnome_corba_types (void)
 
 #include "guile-gnome-corba-types.x"
 
-    gsubr = scm_c_make_gsubr ("%print-corba-struct", 2, 0, 0, print_corba_struct);
+    gsubr = scm_c_define_gsubr ("%print-corba-struct", 2, 0, 0, print_corba_struct);
     scm_corba_struct_vtable = scm_permanent_object
-        (scm_make_vtable_vtable (scm_from_locale_string ("srprprprpopopW"),
-                                scm_from_int (0), SCM_LIST1 (gsubr)));
+        (scm_make_vtable (scm_from_locale_string ("srprprprpopopW"), SCM_LIST1 (gsubr)));
     SCM_SET_CORBA_STRUCT_TYPECODE (scm_corba_struct_vtable, TC_CORBA_TypeCode);
     scm_c_define ("%corba-struct-vtable", scm_corba_struct_vtable);
     scm_c_define ("%corba-struct-vtable-offset-user", scm_from_int (scm_corba_struct_vtable_offset_user));
     scm_c_define ("%corba-struct-vtable-offset-printer", scm_from_int (scm_vtable_index_instance_printer));
 
-    gsubr = scm_c_make_gsubr ("%print-corba-sequence", 2, 0, 0, print_corba_sequence);
+    gsubr = scm_c_define_gsubr ("%print-corba-sequence", 2, 0, 0, print_corba_sequence);
     scm_corba_sequence_vtable = scm_permanent_object
-        (scm_make_vtable_vtable (scm_from_locale_string ("srprprprpopW"),
-                                scm_from_int (0), SCM_LIST1 (gsubr)));
+        (scm_make_vtable (scm_from_locale_string ("srprprprpopW"), SCM_LIST1 (gsubr)));
     SCM_SET_CORBA_SEQUENCE_TYPECODE (scm_corba_sequence_vtable, TC_CORBA_TypeCode);
     scm_c_define ("%corba-sequence-vtable", scm_corba_sequence_vtable);
     scm_c_define ("%corba-sequence-vtable-offset-user", scm_from_int (scm_corba_sequence_vtable_offset_user));

_but_  it fails make check [which pass with the original code], any idea why?


make[1]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
make  check-TESTS
make[2]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
make[3]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
../../build-aux/test-driver: line 107:  9208 Segmentation fault      "$@" > $log_file 2>&1
FAIL: wrapset.scm
make[4]: Entering directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
============================================================================
Testsuite summary for guile-gnome-platform 2.16.2
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See corba/tests/test-suite.log
============================================================================
Makefile:581: recipe for target 'test-suite.log' failed
make[3]: *** [test-suite.log] Error 1
make[3]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
Makefile:687: recipe for target 'check-TESTS' failed
make[2]: *** [check-TESTS] Error 2
make[2]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
Makefile:753: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/usr/local/src/guile-gnome/git-clone/corba/tests'
Makefile:389: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
david@capac:/usr/local/src/guile-gnome/git-clone/corba 321 $ 


Annotation number 2: corba primitives.scm
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6/2
Paste contents:
Raw Source | Display As
-> actual version [type is undefined]

(define-method (allocate-instance (class <CORBA:Object>) initargs)
  (if (or (get-keyword #:dsupers initargs #f))
      (next-method)
      (let* ((object (next-method))
	     (servant (get-keyword #:servant initargs *unspecified*))
	     (ior (get-keyword #:ior initargs *unspecified*)))
	(gnome-corba-error "Can't make instances of this type: ~A" type))))

-> proposed patch

(define-method (allocate-instance (type <CORBA:Object>) initargs)
  (if (get-keyword #:dsupers initargs #f)
      (next-method)
      (let* ((object (next-method))
	     (servant (get-keyword #:servant initargs *unspecified*))
	     (ior (get-keyword #:ior initargs *unspecified*)))
	(gnome-corba-error "Can't make instances of this type: ~A" type))))

Annotation number 3: guile-gnome-corba-types.c (2)
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6/3
Paste contents:
Raw Source | Display As
diff --git a/corba/gnome/corba/guile-gnome-corba-types.c b/corba/gnome/corba/guile-gnome-corba-types.c
index b23381b..24138c0 100644
--- a/corba/gnome/corba/guile-gnome-corba-types.c
+++ b/corba/gnome/corba/guile-gnome-corba-types.c
@@ -819,19 +819,17 @@ scm_init_gnome_corba_types (void)
 
 #include "guile-gnome-corba-types.x"
 
-    gsubr = scm_c_make_gsubr ("%print-corba-struct", 2, 0, 0, print_corba_struct);
+    gsubr = scm_c_define_gsubr ("%print-corba-struct", 2, 0, 0, print_corba_struct);
     scm_corba_struct_vtable = scm_permanent_object
-        (scm_make_vtable_vtable (scm_from_locale_string ("srprprprpopopW"),
-                                scm_from_int (0), SCM_LIST1 (gsubr)));
+        (scm_make_vtable (scm_from_latin1_string ("srprprprpopopW"), gsubr));
     SCM_SET_CORBA_STRUCT_TYPECODE (scm_corba_struct_vtable, TC_CORBA_TypeCode);
     scm_c_define ("%corba-struct-vtable", scm_corba_struct_vtable);
     scm_c_define ("%corba-struct-vtable-offset-user", scm_from_int (scm_corba_struct_vtable_offset_user));
     scm_c_define ("%corba-struct-vtable-offset-printer", scm_from_int (scm_vtable_index_instance_printer));
 
-    gsubr = scm_c_make_gsubr ("%print-corba-sequence", 2, 0, 0, print_corba_sequence);
+    gsubr = scm_c_define_gsubr ("%print-corba-sequence", 2, 0, 0, print_corba_sequence);
     scm_corba_sequence_vtable = scm_permanent_object
-        (scm_make_vtable_vtable (scm_from_locale_string ("srprprprpopW"),
-                                scm_from_int (0), SCM_LIST1 (gsubr)));
+        (scm_make_vtable (scm_from_latin1_string ("srprprprpopW"), gsubr));
     SCM_SET_CORBA_SEQUENCE_TYPECODE (scm_corba_sequence_vtable, TC_CORBA_TypeCode);
     scm_c_define ("%corba-sequence-vtable", scm_corba_sequence_vtable);
     scm_c_define ("%corba-sequence-vtable-offset-user", scm_from_int (scm_corba_sequence_vtable_offset_user));

Annotation number 4: segfault
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6/4
Paste contents:
Raw Source | Display As

(use-modules (unit-test)
             (apicheck)
             (ice-9 pretty-print)
             (oop goops)
	     (gnome-2))

(define-class <test-wrapset-api> (<test-case>))

(define *modules*
  (call-with-input-string "((gnome gw corba) (gnome corba) (gnome corba primitives) (gnome corba types))"
			  read))
(define *api-file*
  "/usr/local/src/guile-gnome/git-clone/corba/tests/wrapset.api")

(define-method (test-wrapset-api (self <test-wrapset-api>))
  (apicheck-validate
   (call-with-input-file *api-file* read)
   *modules*))


scheme@(guile-user)> (run-all-defined-test-cases)

Running test suite: main-suite ----------------------------------------

Running test suite: <test-wrapset-api>-suite --------------------------
Running test case: test-wrapset-api
Segmentation fault
david@capac:~ 86 $ 

Annotation number 5: segfault strace
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6/5
Paste contents:
Raw Source | Display As
execve("./wraptest.scm", ["./wraptest.scm"], [/* 60 vars */]) = 0
... ...
open("/home/david/.cache/guile/ccache/2.0-LE-8-2.0/home/david/tmp/wraptest.scm.go", O_RDONLY|O_CLOEXEC) = 5
... ...
{st_mode=S_IFREG|0664, st_size=4840, ...}) = 0
open("/home/david/.cache/guile/ccache/2.0-LE-8-2.0/opt/share/guile-gnome-2/gnome/corba/primitives.scm.go", O_RDONLY|O_CLOEXEC) = 9
fstat(9, {st_mode=S_IFREG|0664, st_size=4840, ...}) = 0
mmap(NULL, 4840, PROT_READ, MAP_PRIVATE, 9, 0) = 0x7fa9c0c1c000
close(9)                                = 0
brk(0x2a3c000)                          = 0x2a3c000
stat("/opt/share/guile/2.0/ice-9/eval-string.scm", {st_mode=S_IFREG|0644, st_size=2997, ...}) = 0
stat("/opt/lib/guile/2.0/ccache/ice-9/eval-string.go", {st_mode=S_IFREG|0644, st_size=3859, ...}) = 0
open("/opt/lib/guile/2.0/ccache/ice-9/eval-string.go", O_RDONLY|O_CLOEXEC) = 9
fstat(9, {st_mode=S_IFREG|0644, st_size=3859, ...}) = 0
mmap(NULL, 3859, PROT_READ, MAP_PRIVATE, 9, 0) = 0x7fa9c0264000
close(9)                                = 0
futex(0x7fa9c2d47068, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0x2a64000)                          = 0x2a64000
brk(0x2a65000)                          = 0x2a65000
brk(0x2a5d000)                          = 0x2a5d000
stat("/usr/lib/x86_64-linux-gnu/orbit-2.0/Bonobo_module", 0x7ffff62869a0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/orbit-2.0/Bonobo_module.so", {st_mode=S_IFREG|0644, st_size=138552, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/orbit-2.0/Bonobo_module.so", O_RDONLY|O_CLOEXEC) = 9
read(9, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\354\0\0\0\0\0\0"..., 832) = 832
fstat(9, {st_mode=S_IFREG|0644, st_size=138552, ...}) = 0
mmap(NULL, 2233896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 9, 0) = 0x7fa9bdce5000
mprotect(0x7fa9bdcf7000, 2097152, PROT_NONE) = 0
mmap(0x7fa9bdef7000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0x12000) = 0x7fa9bdef7000
close(9)                                = 0
mprotect(0x7fa9bdef7000, 24576, PROT_READ) = 0
brk(0x2a82000)                          = 0x2a82000
brk(0x2a7a000)                          = 0x2a7a000
brk(0x2a72000)                          = 0x2a72000
open("/proc/self/statm", O_RDONLY)      = 9
fstat(9, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa9c0263000
read(9, "23964 4534 1589 1 0 3039 0\n", 1024) = 27
close(9)                                = 0
munmap(0x7fa9c0263000, 4096)            = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 210896025}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 217697829}) = 0
brk(0x2c24000)                          = 0x2c24000
brk(0x2c34000)                          = 0x2c34000
open("/proc/self/statm", O_RDONLY)      = 9
fstat(9, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa9c0263000
read(9, "24414 4982 1590 1 0 3489 0\n", 1024) = 27
close(9)                                = 0
munmap(0x7fa9c0263000, 4096)            = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 256267408}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
brk(0x2eb2000)                          = 0x2eb2000
clock_gettime(0x2 /* CLOCK_??? */, {0, 263474109}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Annotation number 6: identified test case that segfault
Pasted by: daviid
When:10 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+32F6/6
Paste contents:
Raw Source | Display As
;; wrapset-corba-struct-vtable-only.api
(module-api
  (version 1 0)
  ((gnome corba types)
   (uses-interfaces)
   (typed-exports
     (%corba-struct-vtable struct-vtable)
     )))


;; wraptest.scm [chmod a+x this file]
#!/bin/sh
# -*- mode: scheme; coding: utf-8 -*-
export G_SLICE=always-malloc
export GUILE_WARN_DEPRECATED="detailed"
exec guile -e main -s $0 "$@"
!#

(use-modules (unit-test)
             (apicheck)
             (ice-9 pretty-print)
             (oop goops)
	     (gnome-2))

(define-class <test-wrapset-api> (<test-case>))

(define *modules*
  (call-with-input-string "((gnome gw corba) (gnome corba) (gnome corba primitives) (gnome corba types))"
			  read))
(define *api-file*
  #;"/usr/local/src/guile-gnome/git-clone/corba/tests/wrapset.api"
  "/usr/local/src/guile-gnome/git-clone/corba/tests/wrapset-corba-struct-vtable-only.api")

(define-method (test-wrapset-api (self <test-wrapset-api>))
  (apicheck-validate
   (call-with-input-file *api-file* read)
   *modules*))

(define (main . args)
  (run-all-defined-test-cases))


;; let's run it:
david@capac:~/tmp 116 $ ./wraptest.scm 
;;; note: source file /home/david/tmp/./wraptest.scm
;;;       newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/home/david/tmp/wraptest.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/david/tmp/./wraptest.scm
;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/home/david/tmp/wraptest.scm.go

Running test suite: main-suite ----------------------------------------

Running test suite: <test-wrapset-api>-suite --------------------------
Running test case: test-wrapset-api

;;; WARNING (New API, update your API form ((gnome corba) (gnome corba primitives) (gnome gobject generics) (gnome gw corba) (gnome gw generics)))

;;; WARNING (New API, update your API form (%corba-sequence-vtable %corba-sequence-vtable-offset-printer %corba-sequence-vtable-offset-user %corba-struct-vtable-offset-printer %corba-struct-vtable-offset-user corba-object-class->typecode corba-sequence-length corba-sequence-ref corba-sequence-set! corba-sequence-set-length! corba-sequence-type corba-struct-fields corba-struct-is-a? corba-struct-ref corba-struct-set! corba-struct-type corba-struct? corba-typecode->gtype-class gnome-corba-error make-corba-sequence make-corba-struct))
Segmentation fault
david@capac:~/tmp 117 $ 



Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.