[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help please! To track down GC trying to free an already freed object
From: |
Alan Mackenzie |
Subject: |
Re: Help please! To track down GC trying to free an already freed object. |
Date: |
Fri, 5 Apr 2019 08:26:52 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Alex.
On Thu, Apr 04, 2019 at 22:49:22 -0600, Alex wrote:
> Alan Mackenzie <address@hidden> writes:
> > On Tue, Apr 02, 2019 at 13:33:02 -0700, Daniel Colascione wrote:
> >> So if I read symbol foo from file1.el and symbol foo from file2.el,
> >> I get two different symbol-with-location instances, each tagged with
> >> a different source location? Do these symbol objects compare eq to
> >> each other?
> > They do, yes. Otherwise the byte compiler wouldn't work, as it
> > frequently compares a symbol-with-position with a constant
> > ("ordinary") symbol using eq.
> > However, it is envisaged the flag symbols-with-pos-enable will be bound
> > to non-nil only by the byte compiler. The reader resets this position to
> > zero for each top-level form it reads.
> I apologize if this topic already reached its conclusion, but IMO
> having eq return true for two different object types is quite
> surprising behaviour.
We are comparing two symbols, both of which are 'foo, but one of which is
annotated with its position in a source file. The two symbols are the
same symbol.
I understand the reaction to the idea, though. Even though the
representation of these two objects is different, conceptually they are
the same object.
But consider: on a make bootstrap I did last night, there were 332
warning messages from the byte compiler. Of these, only 80 gave the
correct line/column position, the other 252 being wrong. There have been
several bug reports from users complaining about such false positions.
This is what I'm trying to fix.
> Is it out of the question to leave eq alone and introduce, e.g.,
> eq-excluding-position that strips possible positions before comparison?
It is, rather. To implement this would involve rewriting everything
which calls eq and is used by the byte compiler, to call
eq-excluding-position instead. These functions would need to exist in
two versions. There are rather a lot of functions which use eq. ;-)
My actual strategy is to have two versions of each C primitive used by
the byte compiler, and to switch over to the "symbol-with-position"
version at the start of the byte compiler.
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Help please! To track down GC trying to free an already freed object., (continued)
- Re: Help please! To track down GC trying to free an already freed object., Alan Mackenzie, 2019/04/02
- Re: Help please! To track down GC trying to free an already freed object., Daniel Colascione, 2019/04/02
- Re: Help please! To track down GC trying to free an already freed object., Eli Zaretskii, 2019/04/03
- Re: Help please! To track down GC trying to free an already freed object., Alan Mackenzie, 2019/04/03
- Re: Help please! To track down GC trying to free an already freed object., Eli Zaretskii, 2019/04/03
- Re: Help please! To track down GC trying to free an already freed object., Paul Eggert, 2019/04/03
Re: Help please! To track down GC trying to free an already freed object., Alan Mackenzie, 2019/04/02
- Re: Help please! To track down GC trying to free an already freed object., Daniel Colascione, 2019/04/02
- Re: Help please! To track down GC trying to free an already freed object., Alan Mackenzie, 2019/04/02
- Re: Help please! To track down GC trying to free an already freed object., Alex, 2019/04/05
- Re: Help please! To track down GC trying to free an already freed object.,
Alan Mackenzie <=
- Comparing symbol-with-position using eq (was: Help please! To track down GC trying to free an already freed object.), Alex, 2019/04/05
- Re: Comparing symbol-with-position using eq, Alan Mackenzie, 2019/04/05
- Re: Comparing symbol-with-position using eq, Daniel Colascione, 2019/04/05
- Re: Comparing symbol-with-position using eq, Alan Mackenzie, 2019/04/05
- Re: Comparing symbol-with-position using eq, Paul Eggert, 2019/04/05
- Re: Comparing symbol-with-position using eq, Clément Pit-Claudel, 2019/04/06