[BUG] Finternal_merge_in_global_face segfault

View: New views
5 Messages — Rating Filter:   Alert me  

[BUG] Finternal_merge_in_global_face segfault

by Johannes Weiner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

this change

2008-06-30  Chong Yidong  <cyd@...>

        * xfaces.c (Finternal_merge_in_global_face): If default face was
        modified, realize it again.  Update the font face attribute.

makes Emacs segfault in batch mode.

The culprit is the bcopy(oldface->lface, ...) according to the
stacktrace.  I couldn't get gdb to let me inspect oldface (any hints?).

Reverting this change works for me.

        Hannes



Re: [BUG] Finternal_merge_in_global_face segfault

by Chong Yidong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Johannes Weiner <hannes@...> writes:

> this change
>
> 2008-06-30  Chong Yidong  <cyd@...>
>
>         * xfaces.c (Finternal_merge_in_global_face): If default face was
>         modified, realize it again.  Update the font face attribute.
>
> makes Emacs segfault in batch mode.
>
> The culprit is the bcopy(oldface->lface, ...) according to the
> stacktrace.  I couldn't get gdb to let me inspect oldface (any hints?).

It's probably optimized out.  You should recompile Emacs without
optimization (CFLAGS='-g' ./configure; make) and try again.

Please provide a recipe to reproduce this segfault.



Re: [BUG] Finternal_merge_in_global_face segfault

by Johannes Weiner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Chong Yidong <cyd@...> writes:

> Johannes Weiner <hannes@...> writes:
>
>> this change
>>
>> 2008-06-30  Chong Yidong  <cyd@...>
>>
>>         * xfaces.c (Finternal_merge_in_global_face): If default face was
>>         modified, realize it again.  Update the font face attribute.
>>
>> makes Emacs segfault in batch mode.
>>
>> The culprit is the bcopy(oldface->lface, ...) according to the
>> stacktrace.  I couldn't get gdb to let me inspect oldface (any hints?).
>
> It's probably optimized out.  You should recompile Emacs without
> optimization (CFLAGS='-g' ./configure; make) and try again.

I did that (-O0 -g) and could inspect other stuff in this context, not
this.  Weird.

> Please provide a recipe to reproduce this segfault.

emacs -batch -f format

        Hannes



Re: [BUG] Finternal_merge_in_global_face segfault

by Chong Yidong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Johannes Weiner <hannes@...> writes:

>> Please provide a recipe to reproduce this segfault.
>
> emacs -batch -f format

Thanks.  I've checked in a fix.



Re: [BUG] Finternal_merge_in_global_face segfault

by Johannes Weiner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Chong Yidong <cyd@...> writes:

> Johannes Weiner <hannes@...> writes:
>
>>> Please provide a recipe to reproduce this segfault.
>>
>> emacs -batch -f format
>
> Thanks.  I've checked in a fix.

Working!  Thanks a lot for the quick fix!

        Hannes


LightInTheBox - Buy quality products at wholesale price