Subject: bug#24063: 25.1; Emacs 25.1 RC1 crashes on Solaris 11.3 when asked to open and display an image

From: Eli Zaretskii <[email-masked]>
Date: Mon, 25 Jul 2016 19:39:17 +0300

> Date: Mon, 25 Jul 2016 00:00:06 -0700
> From: Henry Unger <[email-masked]>
> Cc: [email-masked]
> 
> I rebuilt it, adding "-g" to CFLAGS, and  reproduced the problem, which now shows line numbers:
> 
> current thread: t@1
>   [1] __lwp_sigqueue(0x0, 0x1, 0xb, 0x0, 0xffffffff, 0x0, 0xb, 0x6105b88), at 0x610cf85
>   [2] thr_kill(0x1, 0xb, 0x8511298, 0x60af2e1), at 0x6105bb2
>   [3] raise(0xb, 0x85112b0, 0x0, 0x0, 0x400, 0x0), at 0x60af2ed
> =>[4] terminate_due_to_signal(sig = 11, backtrace_limit = 40), line 381 in "emacs.c"
>   [5] deliver_fatal_signal(sig = <bad address 0x00000004>), line 1607 in "sysdep.c"
>   [6] deliver_thread_signal(sig = 11, handler = 0x81f6f4c = &`emacs`sysdep.c`handle_fatal_signal(int sig)), line 1575 in "sysdep.c"
>   [7] deliver_fatal_thread_signal(sig = 11), line 1613 in "sysdep.c"
>   [8] handle_sigsegv(sig = 11, siginfo = 0x851199c, arg = 0x851144c), line 1695 in "sysdep.c"
>   [9] __sighndlr(0xb, 0x851199c, 0x851144c, 0x81f708c), at 0x61084b5
>   [10] call_user_handler(0xb), at 0x60fb10e
>   [11] sigacthandler(0xb, 0x851199c, 0x851144c, 0x1f, 0x0, 0x0), at 0x60fb5a6
>   ---- called from signal handler with signal 11 (SIGSEGV) ------
>   [12] imagemagick_load_image(f = 0x8a0c5a8, img = 0x8afcd00, contents = (nil), size = 0, filename = 0x8caa450 "/home/hunger/foo.png"), line 8787 in "image.c"

Thanks.  This is here:

	  int xlim = min (row_width, width);
	  for (x = 0; x < xlim; x++)
            {
              PixelGetMagickColor (pixels[x], &pixel);
              XPutPixel (ximg, x, y,  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                         lookup_rgb_color (f,
					   color_scale * pixel.red,
					   color_scale * pixel.green,
					   color_scale * pixel.blue));
            }

That particular line is a strange place to crash.  Can you tell what
are the values of ximg, xlim, x, y, and pixels[x] when it crashes?