From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 21 Aug 2013 15:29:27 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: <0A2E2FB2-B2F1-444E-AF62-85FAC05335EA@bitblocks.com> References: <2332222c9f75f30c6395f16787280535@brasstown.quanstro.net> <20130821184909.51FA2B827@mail.bitblocks.com> <0A2E2FB2-B2F1-444E-AF62-85FAC05335EA@bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] more on why vc can't produce amd64 executables Topicbox-Message-UUID: 739c8462-ead8-11e9-9d60-3106f5b1d025 > How %p is treated is really upto the implementation but > it should not crash since p is never dereferenced. Does > this work? > > uintptr q; > print("%p", q); no. if i change the print to print an integer, it still fails. in fact, it's really the indirect call in print that fails. this is the instruction CALL *AX acid; *AX 0x002014b300000000 acid; src(*AX>>32) /sys/src/libc/fmt/dofmt.c:310 305 return _fmtrcpy(f, x, 1); 306 } 307 308 /* fmt an integer */ 309 int >310 _ifmt(Fmt *f) 311 { 312 char buf[88], *p, *conv; 313 uvlong vu; 314 ulong u; 315 uintptr pu; - erik