X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:subject:to:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=X+U Br6bIHXdoaL7y0bTO1Nq4Lqj/8lzotW4I0vIoQGwiXtxMu/Hr9ssjUpkLZbey/WT nLl+9ySUPjrczuFx07o0lzu9qPTOm3tkAKOUgtdJtkrDrMJpLgXO2B7O0ivw4BEm CyJ3qqDmaJ7HLRpLTzD+nxcOT3ws0U1tx5mXUe+4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:subject:to:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=9QUrB1ya6 0q7YLAVXuqxUr8AFLg=; b=vZEj4FlFvfK2XetoDQxtTWKRSDGGKc6/EI+g5wky3 EhLip1fFQxaOAn4NtqOVajIX+PH1vUJituYl1OgGeca193GE41ER5nMV8YHIjEqo p4zgHORaalAkeWMVU+rKbg77lNvlfB1LRDCQWMB1SUwd84T/y6dgYoBTxgPyWFQX ZY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f173.google.com X-Received: by 10.55.56.130 with SMTP id f124mr10343731qka.79.1446218706019; Fri, 30 Oct 2015 08:25:06 -0700 (PDT) From: Marco Atzeri Subject: Segmentation fault before main To: "cygwin AT cygwin DOT com" Message-ID: <56338BCC.40709@gmail.com> Date: Fri, 30 Oct 2015 16:25:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Hi Corinna, as mention some time ago, testing netcdf 4.4.0 release candidates I see a puzzling SIGSEGV before reaching main, so something goes wrong on cygwin loading/inizialization of the program. It happens in a simple test programs that is linked to cygnetcdf-7.dll and its only job is to create a test file called ctest0.nc. Previous 4.3.3.1 test case runs fine. The new ctest.c fails both with the new and with the old library. Test case and binaries are here : http://matzeri.altervista.org/works/segfault/ $ gcc ctest.c -o ctest.exe -lnetcdf $ gdb ./ctest.exe (gdb) break main Breakpoint 1 at 0x100401171 (gdb) run Starting program: /cygdrive/e/cyg_pub/devel/netcdf/tests/ctest-440.exe [New Thread 8404.0x18f4] [New Thread 8404.0xa8c] [New Thread 8404.0x2270] Program received signal SIGSEGV, Segmentation fault. ___chkstk_ms () at /usr/src/debug/gcc-4.9.3-1/libgcc/config/i386/cygwin.S:146 146 orq $0x0, (%rcx) /* probe there */ $ uname -svrm CYGWIN_NT-6.1 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 libnetcdf-devel 4.3.3.1-2 libnetcdf7 4.3.3.1-2 netcdf 4.3.3.1-2 netcdf-debuginfo 4.3.3.1-2 Unfortunately I have no clue about this code: /* ___chkstk_ms is a *special* function call, which uses %rax as the argument. We avoid clobbering any registers. Unlike ___chkstk, it just probes the stack and does no stack allocation. */ .global ___chkstk_ms #ifdef __x86_64__ cfi_startproc() ___chkstk_ms: pushq %rcx /* save temps */ cfi_push(%rcx) pushq %rax cfi_push(%rax) cmpq $0x1000, %rax /* > 4k ?*/ leaq 24(%rsp), %rcx /* point past return addr */ jb 2f 1: subq $0x1000, %rcx /* yes, move pointer down 4k */ orq $0x0, (%rcx) /* probe there */ Any help will be really appreciated. Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple