From owner-freebsd-current@FreeBSD.ORG Wed May 12 16:55:36 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 660B41065675 for ; Wed, 12 May 2010 16:55:36 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id 076808FC1A for ; Wed, 12 May 2010 16:55:35 +0000 (UTC) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id 92E685AC6E; Wed, 12 May 2010 18:55:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 8FA6E5AC5E; Wed, 12 May 2010 18:55:31 +0200 (CEST) X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 63BD55CC68; Wed, 12 May 2010 18:55:31 +0200 (CEST) Received: from wep4035 ([132.187.37.35]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.5.1FP2HF71) with ESMTP id 2010051218553023-72660 ; Wed, 12 May 2010 18:55:30 +0200 Received: by wep4035 (sSMTP sendmail emulation); Wed, 12 May 2010 18:55:30 +0200 Date: Wed, 12 May 2010 18:55:30 +0200 From: Alexey Shuvaev To: freebsd-current@freebsd.org Message-ID: <20100512165530.GA40826@wep4035.physik.uni-wuerzburg.de> MIME-Version: 1.0 Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.20 (2009-06-14) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.5.1FP2HF71 | April 5, 2010) at 05/12/2010 06:55:31 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.5.1FP2HF71 | April 5, 2010) at 05/12/2010 06:55:31 PM, Serialize complete at 05/12/2010 06:55:31 PM Content-Type: multipart/mixed; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline Cc: gabor@FreeBSD.org Subject: dc(1) -e "6 2 / p" is still broken as of r207919 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 16:55:36 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello! Just to remind that still: ~> dc -e "6 2 / p" Segmentation fault (core dumped) This was already mentioned on this list: http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016560.html and there is a patch proposed in the same thread: http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016603.html Note, however, that reverting r203438 also fixes the problem (gabor@ CC-ed), so I'm not sure what is the right way to fix it. Attached is slightly modified reverse patch to revert 203438. Thanks, Alexey. --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch --- dc.c 2010/01/20 21:30:52 202719 +++ dc.c 2010/02/03 19:13:41 203438 @@ -82,15 +82,7 @@ { int ch; bool extended_regs = false, preproc_done = false; - char *buf; - if ((buf = strdup("")) == NULL) - err(1, NULL); - - init_bmachine(extended_regs); - setlinebuf(stdout); - setlinebuf(stderr); - /* accept and ignore a single dash to be 4.4BSD dc(1) compatible */ while ((ch = getopt_long(argc, argv, "e:f:Vx", long_options, NULL)) != -1) { switch (ch) { @@ -123,6 +115,10 @@ argc -= optind; argv += optind; + init_bmachine(extended_regs); + setlinebuf(stdout); + setlinebuf(stderr); + if (argc > 1) usage(); if (argc == 1) { --LQksG6bCIzRHxTLp--