all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: scratch/igc 50f3a9309d8 1/3: scan_stack with __builtin_unwind_init
       [not found] ` <20240720074130.5C19DC1FB72@vcs2.savannah.gnu.org>
@ 2024-07-20  8:06   ` Pip Cet
  2024-07-20  8:46     ` Gerd Möllmann
  0 siblings, 1 reply; 3+ messages in thread
From: Pip Cet @ 2024-07-20  8:06 UTC (permalink / raw)
  To: Gerd Moellmann; +Cc: Emacs Devel

On Saturday, July 20th, 2024 at 07:41, Gerd Moellmann <gerd@gnu.org> wrote:
> branch: scratch/igc
> commit 50f3a9309d80c46c4d0b0b362ad65ef509c4d8ad
> Author: Gerd Möllmann gerd@gnu.org
> 
> Commit: Gerd Möllmann gerd@gnu.org
> 
> 
> scan_stack with __builtin_unwind_init
> ---
> src/igc.c | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/src/igc.c b/src/igc.c
> index 9298cae66db..e63b796997a 100644
> --- a/src/igc.c
> +++ b/src/igc.c
> @@ -1356,6 +1356,24 @@ scan_ambig (mps_ss_t ss, void *start, void *end, void *closure)
> return MPS_RES_OK;
> }
> 
> +static mps_res_t
> +scan_stack (mps_ss_t ss, void *start, void *end, void *closure)
> +{
> + MPS_SCAN_BEGIN (ss)
> + {
> +#ifdef HAVE___BUILTIN_UNWIND_INIT
> + __builtin_unwind_init ();
> + asm ("");
> + void *p;
> + start = min (start, (void *) &p);
> + end = max (end, (void *) &p);

That assumes we're scanning the current thread, right? It appears to break

(make-thread (lambda () (igc-collect)))

here...

By the way, I'm seeing weird errors when I compile with clang and -flto for Android. Can you check whether Apple clang maybe enables -flto for -O?

Pip



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: scratch/igc 50f3a9309d8 1/3: scan_stack with __builtin_unwind_init
  2024-07-20  8:06   ` scratch/igc 50f3a9309d8 1/3: scan_stack with __builtin_unwind_init Pip Cet
@ 2024-07-20  8:46     ` Gerd Möllmann
  2024-07-20  8:54       ` Gerd Möllmann
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Möllmann @ 2024-07-20  8:46 UTC (permalink / raw)
  To: Pip Cet; +Cc: Gerd Moellmann, Emacs Devel

Pip Cet <pipcet@protonmail.com> writes:

> That assumes we're scanning the current thread, right? It appears to break
>
> (make-thread (lambda () (igc-collect)))

Shit, yes :-(. I'll revert that.

> here...
>
> By the way, I'm seeing weird errors when I compile with clang and
> -flto for Android. Can you check whether Apple clang maybe enables
> -flto for -O?

Hard to tell. Any idea how I could check that?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: scratch/igc 50f3a9309d8 1/3: scan_stack with __builtin_unwind_init
  2024-07-20  8:46     ` Gerd Möllmann
@ 2024-07-20  8:54       ` Gerd Möllmann
  0 siblings, 0 replies; 3+ messages in thread
From: Gerd Möllmann @ 2024-07-20  8:54 UTC (permalink / raw)
  To: Pip Cet; +Cc: Gerd Moellmann, Emacs Devel

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Pip Cet <pipcet@protonmail.com> writes:
>
>> That assumes we're scanning the current thread, right? It appears to break
>>
>> (make-thread (lambda () (igc-collect)))
>
> Shit, yes :-(. I'll revert that.
>
>> here...
>>
>> By the way, I'm seeing weird errors when I compile with clang and
>> -flto for Android. Can you check whether Apple clang maybe enables
>> -flto for -O?
>
> Hard to tell. Any idea how I could check that?

Judging from the man page, -flto is probably not the default.

       -flto, -flto=full, -flto=thin, -emit-llvm
              Generate output files in LLVM formats, suitable for link time
              optimization.  When used with -S this generates LLVM
              intermediate language assembly files, otherwise this generates
              LLVM bitcode format object files (which may be passed to the
              linker depending on the stage selection options).

              The default for -flto is "full", in which the LLVM bitcode is
              suitable for monolithic Link Time Optimization (LTO), where the
              linker merges all such modules into a single combined module for
              optimization. With "thin", ThinLTO compilation is invoked
              instead.

              NOTE:
                 On Darwin, when using -flto along with -g and compiling and
                 linking in separate steps, you also need to pass
                 -Wl,-object_path_lto,<lto-filename>.o at the linking step to
                 instruct the ld64 linker not to delete the temporary object
                 file generated during Link Time Optimization (this flag is
                 automatically passed to the linker by Clang if compilation
                 and linking are done in a single step). This allows debugging
                 the executable as well as generating the .dSYM bundle using
                 dsymutil(1).



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-20  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <172146128986.990.283901147449966365@vcs2.savannah.gnu.org>
     [not found] ` <20240720074130.5C19DC1FB72@vcs2.savannah.gnu.org>
2024-07-20  8:06   ` scratch/igc 50f3a9309d8 1/3: scan_stack with __builtin_unwind_init Pip Cet
2024-07-20  8:46     ` Gerd Möllmann
2024-07-20  8:54       ` Gerd Möllmann

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.