From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.devel Subject: Re: GC and stack marking Date: Thu, 22 May 2014 10:59:00 -0400 Message-ID: References: <83sio2nb4s.fsf@gnu.org> <83r43mmt25.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11348774645d7604f9fe5afc X-Trace: ger.gmane.org 1400770904 21880 80.91.229.3 (22 May 2014 15:01:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 May 2014 15:01:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 22 17:01:38 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WnUUy-00040U-3x for ged-emacs-devel@m.gmane.org; Thu, 22 May 2014 17:01:36 +0200 Original-Received: from localhost ([::1]:38045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnUUx-0005oB-OM for ged-emacs-devel@m.gmane.org; Thu, 22 May 2014 11:01:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnUSV-0002YF-Kd for emacs-devel@gnu.org; Thu, 22 May 2014 10:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnUSU-0003nm-Tg for emacs-devel@gnu.org; Thu, 22 May 2014 10:59:03 -0400 Original-Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:53708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnUST-0003nH-J0; Thu, 22 May 2014 10:59:01 -0400 Original-Received: by mail-ob0-f173.google.com with SMTP id wm4so3944160obc.18 for ; Thu, 22 May 2014 07:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ccynCS3mcLOcr8ZrPHD1uvMIXn1OWAfsGVfGBhNunCE=; b=wjdT3IFs8hm9uYgKzByqU0A455QEn9NPoLLZMghzqzK8BYYRme6b3FdXICyIrcdU6v ARvKPH5U9R85NeX2YbLHOpRnchXbSeD7J6FssrwvMUqaHXEzQu9dAdaiZywAlJ0s0bBM c5cGD0NHujDd021vQKRet7hYF67x0sK4qn4BbT2VAAifN0GezDIo3HHC1KxHaR4x6wIX 9r2rkEDpLvCaIhOEAvT9NHMImHPXFLFgrZ9uAOHP7Pbs+M4qgobW8NrK1dnFH0praMsB t2HqOFe1QO+icIvGIMH1pDI4X6jIigHPQAmaCb0yiwylnc5+LRGELxhBkNAEPtRj2gcc oliQ== X-Received: by 10.182.3.10 with SMTP id 10mr59464727oby.22.1400770740377; Thu, 22 May 2014 07:59:00 -0700 (PDT) Original-Received: by 10.76.6.44 with HTTP; Thu, 22 May 2014 07:59:00 -0700 (PDT) In-Reply-To: <83r43mmt25.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172026 Archived-At: --001a11348774645d7604f9fe5afc Content-Type: text/plain; charset=UTF-8 > Yes. I looked at all the local variables in that stack frame, and > their addresses on the stack are different from the one that > triggers the problem. [I assume you mean "void* values on the stack" rather than "addresses on the stack".] So when you printed the value of a one byte variable like stack_top_variable, you printed it with any alignment padding there might be? Or in case of GC_POINTER_ALIGNMENT < sizeof(void*), you accounted for mark_stack's candidate void* coming partially from different stack variables? And you accounted for the compiler reordering stack variables, eg to more optimally align data? I confirmed for example that stack_top_variable and message_p are allocated next to each other on the stack in my build, with the i variable not between them in memory. --001a11348774645d7604f9fe5afc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> Yes. I looked at all the local variables in that stac= k frame, and
> their addresses on the stack are different from the on= e that
> triggers the problem.

[I assume you mean "void* = values on the stack" rather than "addresses
on the stack".]

So when you printed the value of a one byte var= iable like
stack_top_variable, you printed it with any alignment padding= there
might be?

Or in case of GC_POINTER_ALIGNMENT < sizeof(v= oid*), you accounted for
mark_stack's candidate void* coming partially from different stack
v= ariables?

And you accounted for the compiler reordering stack variab= les, eg to
more optimally align data? I confirmed for example that
stack_top_variable and message_p are allocated next to each other on
the= stack in my build, with the i variable not between them in memory.

=
--001a11348774645d7604f9fe5afc--