ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/07/20/13:15:16

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Mok-Kong Shen <mok-kong DOT shen AT t-online DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: printf statement causes error message
Date: Wed, 20 Jul 2011 18:58:58 +0200
Organization: albasani.net
Lines: 26
Message-ID: <j071gc$s6g$1@news.albasani.net>
Mime-Version: 1.0
X-Trace: news.albasani.net 59QxrC4wk59r2oyz1VBS7voYixGY3q0Qcsc/83Q48ZWD0LtTGkRNBU0zii7O2B5H4Ek95+oNxsmJ4+AmXj0WfotTNwzDSD5ESsHaSr/HHC1ZNFWVe0WyNHplttMb+P4s
NNTP-Posting-Date: Wed, 20 Jul 2011 16:58:52 +0000 (UTC)
Injection-Info: news.albasani.net; logging-data="O7iitSpGQnChEMcJrX71S86l+nIzWPvSCRjxA4ZMPlxnW7a1mfL5GVHAtd7cYpJ72dQJGKSdHld02uAL7I1WyWJph86GHNV2ZC++zOrAffjjf3jpGgFiwQ/A5SAcJwSS"; mail-complaints-to="abuse AT albasani DOT net"
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11
Cancel-Lock: sha1:16k/kZB9ipCaEk4lwyilV9vESvs=
Bytes: 1820
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

Could some expert kindly tell why the one printf statement in the
main program below causes the trouble? (I downloaded the compiler
less than 2 months ago.) Thanks in advance.

M. K. Shen
--------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>

void test()
{ int *hh;
   printf("abc\n"); free(hh); printf("def\n");
}

int main()
{ // If the following printf statement is commented out
   // then no error message ("Exiting due to signal SIGSEGU")

   printf("calling test\n");

   test();
   return 0;
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019