DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 59BIqKGo2005500 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 59BIqKGo2005500 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=jlqysFaT X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A12A33857BBB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1760208738; bh=cIx9MdHw9pwyqt5/VSiZNWLbkC+LOw2+YXPP0y0YyzQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jlqysFaThdkQLr4GKnMwFsEptQqMVqmhx3iPCVL4shH3B+thgZ1KOlT5HMB5uvHid K6fLpv5ZYNuL1etlaKJkvEa0jwX2MNqmd1hJp30oojAReaYH+ZLfizUizKWiIXuZ4w uk8LSCUieV0ZNqZYUqXBrfkf/V3jAzUpIKS8PH18= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECD5B3857C6C ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ECD5B3857C6C ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760208678; cv=none; b=Y8VGj8nGGPr7JYU+d8Q4EiLe7YAxDwdRBF7kX8RzPFfNvUaQQ16Yub90zM24OnLMJoCdKYwPXrByvACaqeTUHjLqqISU+m8j2xgsxRFquhH0voaYIjdoiaLOZjz/lSRLrjSsglLSYtYSBKGpcJk+4mY9+CpIVioqsCkRl+rkJuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760208678; c=relaxed/simple; bh=ZbeLw8HldTY4IgS81PaDdcoXly0BfY4KjeH5vk344Ks=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=ISZNusGpI38RVBI6GzC5zpNNYty4NPPewIunW9f1uk2vpLwdYxFzvpHzqyrxQp1EHlIkFBq/buZQPLpriaJy7ZRBVLNZSjwbGBbxSNfzQOu/GEuzXowbW13V433hbQTeRZ3N37Am38MhQlH7tgBt62B2bQVLIZk+/U7zvaUQlWs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECD5B3857C6C Date: Sat, 11 Oct 2025 18:51:14 +0000 To: cygwin AT cygwin DOT com Subject: Problem with the SDL2 package in Cygwin Message-ID: <20251011205113.0d09ca46@tpx1> MIME-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Thomas Huth via Cygwin Reply-To: Thomas Huth Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi! In the Hatari project (www.hatari-emu.org), we recently hit a problem in the CI when we compile Hatari with Cygwin. A couple of weeks ago, everything was working still fine: https://cirrus-ci.com/task/4681700988420096 Then it suddenly started failing - also for the very same code level of Hatari that was working fine before: https://cirrus-ci.com/task/6377222543507456 The only difference was that the SDL2 package of Cygwin recently has been upgraded from 2.32.8-1 to 2.32.56-1. Christian Zietz, a user of Hatari who has a Windows installation (I don't) debugged the issue a little bit and concluded that it's crashing somewhere during exit(): https://sourceforge.net/p/hatari/mailman/hatari-devel/thread/00253a75-4089-4d8a-846e-8d5c0a4899ee%40gmx.net/#msg59242465 He reproduced it with the following small test program: --------------------- 8< ---------------------------------------- WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ cat sdltest.c #include #include int main(int arc, char ** argv) { if (SDL_Init( SDL_INIT_VIDEO ) == 0) { printf("SDL_Init succeeded\n"); printf("Calling SDL_Quit()\n"); SDL_Quit(); } return 0; } WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ sdl2-config --version 2.32.56 WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ gcc -g -O1 -o sdltest sdltest.c -I /usr/include/SDL2/ -lsdl2 WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ ./sdltest SDL_Init succeeded Calling SDL_Quit() WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ ./sdltest > out.txt WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ cat out.txt WDAGUtilityAccount AT 9f56fa41-fdda-4d08-96da-76c506c9465a /tmp/sdltest $ gdb sdltest.exe GNU gdb (GDB) (Cygwin 14.2-1) 14.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-cygwin". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from sdltest.exe... (gdb) run Starting program: /tmp/sdltest/sdltest.exe [New Thread 7024.0x1918] [New Thread 7024.0x1210] [New Thread 7024.0x1a80] [New Thread 7024.0x18d0] SDL_Init succeeded Calling SDL_Quit() Thread 1 "sdltest" received signal SIGSEGV, Segmentation fault. 0x00000003f96f1020 in ?? () (gdb) bt #0 0x00000003f96f1020 in ?? () #1 0x00007ffb2a577a63 in __call_exitprocs (code=code AT entry=0, d=d AT entry=0x0) at /usr/src/debug/cygwin-3.6.4-1/newlib/libc/stdlib/__call_atexit.c:123 #2 0x00007ffb2a5356ce in exit (code=0) at /usr/src/debug/cygwin-3.6.4-1/newlib/libc/stdlib/exit.c:60 #3 0x00007ffb2a3d6a98 in cygwin_exit (n=0) at /usr/src/debug/cygwin-3.6.4-1/winsup/cygwin/dcrt0.cc:1238 #4 0x00007ffb2a3d80d4 in dll_crt0_1 () at /usr/src/debug/cygwin-3.6.4-1/winsup/cygwin/dcrt0.cc:1003 #5 0x00007ffb2a3d5d05 in _cygtls::call2 (this=0x7ffffce00, func=0x7ffb2a3d707c , arg=0x0, buf=buf AT entry=0x7ffffcdf0) at /usr/src/debug/cygwin-3.6.4-1/winsup/cygwin/cygtls.cc:41 #6 0x00007ffb2a3d5dbb in _cygtls::call (func=, arg=) at /usr/src/debug/cygwin-3.6.4-1/winsup/cygwin/cygtls.cc:28 #7 0x0000000000000000 in ?? () (gdb) --------------------- 8< ---------------------------------------- Could someone please have a look? Thanks, Thomas -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple