Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ld: warning: pointer not aligned at address ..." #7591

Closed
vicuna opened this issue Jul 21, 2017 · 4 comments
Closed

"ld: warning: pointer not aligned at address ..." #7591

vicuna opened this issue Jul 21, 2017 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Jul 21, 2017

Original bug ID: 7591
Reporter: voglerr
Status: resolved (set by @xavierleroy on 2017-09-21T11:49:37Z)
Resolution: fixed
Priority: normal
Severity: minor
OS: macOS
OS Version: 10.13 Beta
Version: 4.05.0
Target version: 4.06.0 +dev/beta1/beta2/rc1
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: platform support (windows, cross-compilation, etc)
Related to: #7887
Monitored by: voglerr @gasche @dbuenzli

Bug description

Since the latest macOS update (probably because of the Xcode update) I get linker warnings with ocamlopt.

? ocamlopt test.ml
ld: warning: pointer not aligned at address 0x100024754 (_caml_startup__frametable + 8 from /var/folders/0j/1lq15k654zg7cf1rh9_gqty80000gn/T/camlstartup9725f2.o)
ld: warning: pointer not aligned at address 0x10002484C (_camlStd_exit__frametable + 8 from /Users/voglerr/.opam/4.05.0/lib/ocaml/std_exit.o)
ld: warning: pointer not aligned at address 0x1000248D4 (_camlTest__frametable + 8 from test.o)
ld: warning: pointer not aligned at address 0x100024994 (_camlCamlinternalFormatBasics__frametable + 8 from /Users/voglerr/.opam/4.05.0/lib/ocaml/stdlib.a(camlinternalFormatBasics.o))
ld: warning: pointer not aligned at address 0x1000266EC (_camlPervasives__frametable + 8 from /Users/voglerr/.opam/4.05.0/lib/ocaml/stdlib.a(pervasives.o))

ocaml 4.05.0, 4.04.1
Xcode Version 9.0 beta 2 (9M137d)
Apple LLVM version 9.0.0 (clang-900.0.26)
macOS 10.13 Beta (17A306f)

File attachments

@vicuna
Copy link
Author

vicuna commented Jul 21, 2017

Comment author: @xavierleroy

Thanks for the advance notice: I see you're into beta versions of MacOS.

We'll need to reproduce. Could you possibly do "ocamlopt -S test.ml" and attach the generated test.s to this report?

@vicuna
Copy link
Author

vicuna commented Jul 22, 2017

Comment author: @xavierleroy

Thanks for the test.s file. Indeed, the frametable of module Test is not properly 8-aligned. This is not a fatal error because x86-64 supports unaligned accesses, but this is not intended nor desirable. A fix is on the way.

@vicuna
Copy link
Author

vicuna commented Jul 22, 2017

Comment author: @xavierleroy

See #1257

@vicuna
Copy link
Author

vicuna commented Sep 21, 2017

Comment author: @xavierleroy

Should be fixed since the merge of #1257

@vicuna vicuna closed this as completed Sep 21, 2017
@vicuna vicuna added this to the 4.06.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
xavierleroy added a commit that referenced this issue Mar 29, 2019
This is a follow-up to commit 7077b60 that fixed a lack of 8-alignment for the frame table on ADM64, as reported in #7591.
A similar issue was reported in #7887 for ARM64 and is fixed here.
For good measure, explicit alignment was added  to PPC64 as well, although there was probably no issue there.

Closes: #7887.
gasche pushed a commit that referenced this issue Jul 17, 2019
This is a follow-up to commit 7077b60 that fixed a lack of 8-alignment for the frame table on ADM64, as reported in #7591.
A similar issue was reported in #7887 for ARM64 and is fixed here.
For good measure, explicit alignment was added  to PPC64 as well, although there was probably no issue there.

Closes: #7887.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant