Re: games/ace crashes

2019-10-02 Thread Solene Rapenne
On Wed, Oct 02, 2019 at 03:40:08PM +0200, Charlene Wendling wrote:
> On Tue, 1 Oct 2019 18:04:49 +0200
> Solene Rapenne wrote:
> 
> > on amd64, few days old snap (I can't upgrade now for some reasons..)
> 
> The build log complains about:
> 
> imagelib.c:109:17: warning: implicit declaration of function 'malloc' is
> invalid in C99 [-Wimplicit-function-declaration]
> 
> Clang uses C11 by default, that's probably why it works fine on macppc
> with the good^W old base-gcc, that uses gnu89 by default.
> 
> So i added the header and... it works :]
> 
> Feedback is welcome!
> 
> Charlène. 
> 
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/games/ace/Makefile,v
> retrieving revision 1.4
> diff -u -p -u -p -r1.4 Makefile
> --- Makefile  12 Jul 2019 20:46:14 -  1.4
> +++ Makefile  2 Oct 2019 13:17:54 -
> @@ -3,7 +3,7 @@
>  COMMENT =solitaire games
>  
>  DISTNAME =   ace-1.4
> -REVISION =   0
> +REVISION =   1
>  
>  SHARED_LIBS +=  cards 0.0 # 1.0
>  
> Index: patches/patch-lib_imagelib_c
> ===
> RCS file: patches/patch-lib_imagelib_c
> diff -N patches/patch-lib_imagelib_c
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-lib_imagelib_c  2 Oct 2019 13:17:54 -
> @@ -0,0 +1,11 @@
> +$OpenBSD$
> +
> +Index: lib/imagelib.c
> +--- lib/imagelib.c.orig
>  lib/imagelib.c
> +@@ -1,4 +1,5 @@
> + #include 
> ++#include 
> + #include 
> + #include "imagelib.h"
> + #include "cards.h"
> 
> 
> 
> 

works fine!
ok solene@



Re: games/ace crashes

2019-10-02 Thread Charlene Wendling
On Tue, 1 Oct 2019 18:04:49 +0200
Solene Rapenne wrote:

> on amd64, few days old snap (I can't upgrade now for some reasons..)

The build log complains about:

imagelib.c:109:17: warning: implicit declaration of function 'malloc' is
invalid in C99 [-Wimplicit-function-declaration]

Clang uses C11 by default, that's probably why it works fine on macppc
with the good^W old base-gcc, that uses gnu89 by default.

So i added the header and... it works :]

Feedback is welcome!

Charlène. 


Index: Makefile
===
RCS file: /cvs/ports/games/ace/Makefile,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 Makefile
--- Makefile12 Jul 2019 20:46:14 -  1.4
+++ Makefile2 Oct 2019 13:17:54 -
@@ -3,7 +3,7 @@
 COMMENT =  solitaire games
 
 DISTNAME = ace-1.4
-REVISION = 0
+REVISION = 1
 
 SHARED_LIBS +=  cards 0.0 # 1.0
 
Index: patches/patch-lib_imagelib_c
===
RCS file: patches/patch-lib_imagelib_c
diff -N patches/patch-lib_imagelib_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-lib_imagelib_c2 Oct 2019 13:17:54 -
@@ -0,0 +1,11 @@
+$OpenBSD$
+
+Index: lib/imagelib.c
+--- lib/imagelib.c.orig
 lib/imagelib.c
+@@ -1,4 +1,5 @@
+ #include 
++#include 
+ #include 
+ #include "imagelib.h"
+ #include "cards.h"






Re: games/ace crashes

2019-10-02 Thread Solene Rapenne
On Wed, Oct 02, 2019 at 12:40:33AM -0600, Anthony J. Bentley wrote:
> Hi Solene,
> 
> Solene Rapenne writes:
> > 0x0ef60c5b99a4 in alloc_synth_image () from 
> > /usr/local/lib/libcards.so.0.
> > 0
> > (gdb) bt
> > #0  0x0ef60c5b99a4 in alloc_synth_image () from 
> > /usr/local/lib/libcards.s
> > o.0.0
> > #1  0x0ef60c5b4517 in card_synth () from /usr/local/lib/libcards.so.0.0
> > #2  0x0ef60c5b737b in stack_set_card_size () from 
> > /usr/local/lib/libcards
> > .so.0.0
> > #3  0x0ef3e3104cbe in ?? ()
> > #4  0x0ef60c5b3385 in table_loop () from /usr/local/lib/libcards.so.0.0
> > #5  0x0ef3e31033bb in ?? ()
> > #6  0x0ef3e310313b in ?? ()
> > #7  0x in ?? ()
> 
> Please rebuild with debugging symbols; otherwise the backtrace provides
> little useful information.
> 
> -- 
> Anthony J. Bentley

of course, here is a backtrace for solitaire

Starting program: /usr/local/bin/solitaire

Program received signal SIGSEGV, Segmentation fault.
alloc_synth_image (list=0xf6cae96c1d0 , width=73, height=97, 
type=2) at imagelib.c:110
110   rv->width = width;
(gdb) bt
#0  alloc_synth_image (list=0xf6cae96c1d0 , width=73, 
height=97, type=2)
at imagelib.c:110
#1  0x0f6cae962517 in card_synth (list=0xf6cae96c1d0 , 
type=2, width=73, height=97)
at table.c:909
#2  0x0f6cae96538b in stack_set_card_size (width=73, height=97) at 
stack.c:235
#3  0x0f6a33571cbe in init () at solitaire.c:104
#4  0x0f6cae961385 in maybe_init () at table.c:322
#5  table_loop () at table.c:352
#6  0x0f6a335703bb in main (argc=, argv=) at 
solitaire.c:678
(gdb) print width
$1 = 73
(gdb) print rv
$2 = (image *) 0x695c7240
(gdb) print rv->width
Cannot access memory at address 0x695c7240

they all crash on the same function.
I tried to compile with ports-clang and ports-gcc (just in case, I'm not sure
it could have produced a different result?) with no better result.



Re: games/ace crashes

2019-10-02 Thread Stuart Henderson

Do you get a more useful stack trace if you build it with DEBUG=-g?

--
Sent from a phone, apologies for poor formatting.

On 1 October 2019 17:05:08 Solene Rapenne  wrote:


on amd64, few days old snap (I can't upgrade now for some reasons..)


From games/ace a lot of binaries produce a segmentation fault:


/tmp $ canfield
Segmentation fault (core dumped)
/tmp $ freecell
Segmentation fault (core dumped)
/tmp $ golf
Segmentation fault (core dumped)
/tmp $ solitaire
Segmentation fault (core dumped)
/tmp $ taipedit
Segmentation fault (core dumped)
/tmp $ thornq
Segmentation fault (core dumped)
/tmp $ taipei
Segmentation fault (core dumped)




an egdb stacktrace for solitaire shows


0x0ef60c5b99a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.0
(gdb) bt
#0  0x0ef60c5b99a4 in alloc_synth_image () from 
/usr/local/lib/libcards.so.0.0

#1  0x0ef60c5b4517 in card_synth () from /usr/local/lib/libcards.so.0.0
#2  0x0ef60c5b737b in stack_set_card_size () from 
/usr/local/lib/libcards.so.0.0

#3  0x0ef3e3104cbe in ?? ()
#4  0x0ef60c5b3385 in table_loop () from /usr/local/lib/libcards.so.0.0
#5  0x0ef3e31033bb in ?? ()
#6  0x0ef3e310313b in ?? ()
#7  0x in ?? ()




for taipei


0x1107a0e0b9a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.0
(gdb)
(gdb) bt
#0  0x1107a0e0b9a4 in alloc_synth_image () from 
/usr/local/lib/libcards.so.0.0

#1  0x1105a020704f in ?? ()
#2  0x1105a0206a04 in ?? ()
#3  0x1107a0e05385 in table_loop () from /usr/local/lib/libcards.so.0.0
#4  0x1105a02053b9 in ?? ()
#5  0x1105a020513b in ?? ()
#6  0x in ?? ()


for golf


0x130c0bd869a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.0
(gdb)
(gdb) bt
#0  0x130c0bd869a4 in alloc_synth_image () from 
/usr/local/lib/libcards.so.0.0

#1  0x130c0bd81517 in card_synth () from /usr/local/lib/libcards.so.0.0
#2  0x130c0bd8437b in stack_set_card_size () from 
/usr/local/lib/libcards.so.0.0

#3  0x13095bc02df5 in ?? ()
#4  0x130c0bd80385 in table_loop () from /usr/local/lib/libcards.so.0.0
#5  0x13095bc0239a in ?? ()
#6  0x13095bc0213b in ?? ()
#7  0x in ?? ()






Re: games/ace crashes

2019-10-02 Thread Anthony J. Bentley
Hi Solene,

Solene Rapenne writes:
> 0x0ef60c5b99a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.
> 0
> (gdb) bt
> #0  0x0ef60c5b99a4 in alloc_synth_image () from /usr/local/lib/libcards.s
> o.0.0
> #1  0x0ef60c5b4517 in card_synth () from /usr/local/lib/libcards.so.0.0
> #2  0x0ef60c5b737b in stack_set_card_size () from /usr/local/lib/libcards
> .so.0.0
> #3  0x0ef3e3104cbe in ?? ()
> #4  0x0ef60c5b3385 in table_loop () from /usr/local/lib/libcards.so.0.0
> #5  0x0ef3e31033bb in ?? ()
> #6  0x0ef3e310313b in ?? ()
> #7  0x in ?? ()

Please rebuild with debugging symbols; otherwise the backtrace provides
little useful information.

-- 
Anthony J. Bentley



games/ace crashes

2019-10-01 Thread Solene Rapenne
on amd64, few days old snap (I can't upgrade now for some reasons..)

>From games/ace a lot of binaries produce a segmentation fault:

/tmp $ canfield
Segmentation fault (core dumped)
/tmp $ freecell
Segmentation fault (core dumped)
/tmp $ golf
Segmentation fault (core dumped)
/tmp $ solitaire
Segmentation fault (core dumped)
/tmp $ taipedit
Segmentation fault (core dumped)
/tmp $ thornq
Segmentation fault (core dumped)
/tmp $ taipei
Segmentation fault (core dumped)


an egdb stacktrace for solitaire shows

0x0ef60c5b99a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.0
(gdb) bt
#0  0x0ef60c5b99a4 in alloc_synth_image () from 
/usr/local/lib/libcards.so.0.0
#1  0x0ef60c5b4517 in card_synth () from /usr/local/lib/libcards.so.0.0
#2  0x0ef60c5b737b in stack_set_card_size () from 
/usr/local/lib/libcards.so.0.0
#3  0x0ef3e3104cbe in ?? ()
#4  0x0ef60c5b3385 in table_loop () from /usr/local/lib/libcards.so.0.0
#5  0x0ef3e31033bb in ?? ()
#6  0x0ef3e310313b in ?? ()
#7  0x in ?? ()


for taipei

0x1107a0e0b9a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.0
(gdb)
(gdb) bt
#0  0x1107a0e0b9a4 in alloc_synth_image () from 
/usr/local/lib/libcards.so.0.0
#1  0x1105a020704f in ?? ()
#2  0x1105a0206a04 in ?? ()
#3  0x1107a0e05385 in table_loop () from /usr/local/lib/libcards.so.0.0
#4  0x1105a02053b9 in ?? ()
#5  0x1105a020513b in ?? ()
#6  0x in ?? ()

for golf

0x130c0bd869a4 in alloc_synth_image () from /usr/local/lib/libcards.so.0.0
(gdb)
(gdb) bt
#0  0x130c0bd869a4 in alloc_synth_image () from 
/usr/local/lib/libcards.so.0.0
#1  0x130c0bd81517 in card_synth () from /usr/local/lib/libcards.so.0.0
#2  0x130c0bd8437b in stack_set_card_size () from 
/usr/local/lib/libcards.so.0.0
#3  0x13095bc02df5 in ?? ()
#4  0x130c0bd80385 in table_loop () from /usr/local/lib/libcards.so.0.0
#5  0x13095bc0239a in ?? ()
#6  0x13095bc0213b in ?? ()
#7  0x in ?? ()