From: Adrian Robert <adrian.b.robert@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 1079@emacsbugs.donarmstrong.com
Subject: bug#1079: GNUstep port segfaults making autoloads on x86_64
Date: Sat, 4 Oct 2008 22:06:54 -0400 [thread overview]
Message-ID: <7F82B60B-481E-48E4-A004-B211E4180421@gmail.com> (raw)
In-Reply-To: <fvhc7r6cqn.fsf@fencepost.gnu.org>
On Oct 4, 2008, at 9:40 PM, Glenn Morris wrote:
> Adrian Robert wrote:
>
>> #ifndef CANNOT_DUMP
>> if (initialized)
>> #endif
>> ns_init_paths ();
>> #endif
>>
>> Hmm, not sure if this ns_init_paths() is needed during the bootstrap
>
> I tried commenting it out; then I get a segfault loading
> term/ns-win.el from the ns-list-colors call.
>
>> -- i.e., should the conditional be different, or should it be moved
>> after the init_...() calls? Unf I cannot test this stuff myself.
>
> I tried (randomly) moving it after init_cmdargs; didn't make a
> difference.
>
> Since it works (for this stage at least) on 32-bit, but not 64, I
> don't think something like that can be the answer.
>
> It's the very first line of ns_init_paths that is the problem, does
> this suggest anything?
>
> NSBundle *bundle = [NSBundle mainBundle];
It's just an ordinary API call, but it's not meant to be run from an
app that is not inside a "bundle". That is, once packaged into
Emacs.app directory structure, it's OK to run this call, but the
behavior would be undefined if just being run as src/[t]emacs. From
your stack trace it looked like GNUstep tried to initialize some of
its internals and ran into an unexpected condition causing the crash.
So, if there were some way to run ns_init_paths() only in either
dumped emacs, or CANNOT_DUMP emacs but NOT during bootstrapping, I
think that would be best.
(I may not have fully thought this through when I first wrote that
conditional, probably since the ns_init_paths impl originally didn't
call -mainBundle.)
As for the location before or after init_ calls, on second thought I'm
not sure this matters a lot. I believe I put it the same place the
Carbon port had its equivalent call.
Regarding the later segfault after commenting out, ns_init_paths only
sets environment variables affecting emacs lisp load paths, does not
initialize anything else. So I'd say this is a separate bug.
next prev parent reply other threads:[~2008-10-05 2:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 21:18 bug#1079: GNUstep port segfaults making autoloads on x86_64 Glenn Morris
2008-10-04 1:04 ` Adrian Robert
2008-10-05 1:40 ` Glenn Morris
2008-10-05 2:06 ` Adrian Robert [this message]
2008-10-06 9:39 ` Yavor Doganov
2008-10-06 17:20 ` Glenn Morris
2008-10-06 18:39 ` Glenn Morris
2008-10-07 19:02 ` Yavor Doganov
2008-10-08 7:51 ` Glenn Morris
2008-10-08 11:55 ` Yavor Doganov
2008-10-10 1:03 ` Glenn Morris
2008-10-10 1:15 ` Processed: " Emacs bug Tracking System
2008-10-06 11:32 ` Yavor Doganov
2008-10-06 17:24 ` Glenn Morris
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=7F82B60B-481E-48E4-A004-B211E4180421@gmail.com \
--to=adrian.b.robert@gmail.com \
--cc=1079@emacsbugs.donarmstrong.com \
--cc=rgm@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.