9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: lucio@proxima.alt.za,
	Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Lock loop in malloc()
Date: Mon, 25 Jul 2011 12:12:35 -0400	[thread overview]
Message-ID: <CADSkJJXQ8V4aKT7Kwk1AuC5RcnPEW7Kuyv6LTE6Bqq13UEwYcg@mail.gmail.com> (raw)
In-Reply-To: <20110725151746.GD27739@fangle.proxima.alt.za>

>> The address passed to lock - 0x1f2f8 in the trace -
>> should be the address of the symbol sbrkmempriv.
>> I assume it will be, but check (if not, there's other
>> memory corruption).  Assuming it is, that's in the bss
>> so the most likely culprits for corruption are the
>> symbols near it: run nm | sort and look around.
>>
> Following Erik's direction, it seems that the lock value is 0x0deadead,
> so I will start with the premise that a problem has been detected, but
> not fatally.  I'll need to dig into cpp, then.  Are there known limits
> in cpp's input sizes?

The lock value being 0x0deadead was a near certainty,
since that's what lock - the function - writes when trying
to acquire it.  It probably had the wrong value to begin
with, but that value has been lost.

I missed that you were hitting a bug in cpp, not bison.
My suggestion about running nm still applies,
and I would take Erik up on his snap offer.

Russ


  reply	other threads:[~2011-07-25 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 13:58 Lucio De Re
2011-07-25 14:40 ` erik quanstrom
2011-07-25 14:42 ` Russ Cox
2011-07-25 15:17   ` Lucio De Re
2011-07-25 16:12     ` Russ Cox [this message]
2011-07-25 17:51     ` erik quanstrom
2011-07-25 19:31       ` Russ Cox
2011-07-26  1:38 ` erik quanstrom
2011-07-26  1:41   ` erik quanstrom
2011-07-26  1:56   ` Russ Cox
     [not found]   ` <CADSkJJUmVYNdy_sUqqM34xdXD9CiWyUUEr89uxouAJ0ydVLpHQ@mail.gmail.c>
2011-07-26  4:01     ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADSkJJXQ8V4aKT7Kwk1AuC5RcnPEW7Kuyv6LTE6Bqq13UEwYcg@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    --cc=lucio@proxima.alt.za \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).