9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] memory bug in 5l
@ 2014-12-10  0:21 yoann padioleau
  2014-12-10  0:24 ` yoann padioleau
  2014-12-10  1:19 ` yoann padioleau
  0 siblings, 2 replies; 6+ messages in thread
From: yoann padioleau @ 2014-12-10  0:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

in 5l/obj.c#zaddr()
there is:
	case D_FCONST:
		while(nhunk < sizeof(Ieee))
			gethunk();
		a->ieee = (Ieee*)hunk;
		nhunk -= NSNAME;
		hunk += NSNAME;

I think it’s a copy paste bug, it should
be sizeof(Ieee) instead of those NSNAME
(or even better the whole code could be factorized
in a call to a->ieee = malloc(sizeof(Ieee));




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-15 21:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-10  0:21 [9fans] memory bug in 5l yoann padioleau
2014-12-10  0:24 ` yoann padioleau
2014-12-10  1:35   ` Steve Simon
2014-12-10  1:19 ` yoann padioleau
2014-12-10 10:07   ` Charles Forsyth
2014-12-15 21:20     ` yoann padioleau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).