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

Fix LispMisc type. #31

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Fix LispMisc type. #31

merged 1 commit into from
Jan 14, 2017

Conversation

jeandudey
Copy link
Contributor

There are a couple of errors when compiling for a 32 bits architecture.
This commit solves these errors.

@Wilfred
Copy link
Collaborator

Wilfred commented Jan 12, 2017

Looks good! Would it be possible to update the Travis configuration so we build against 32-bit architectures too?

@Wilfred
Copy link
Collaborator

Wilfred commented Jan 13, 2017

See also #35, which is also looking at this issue.

@jeandudey jeandudey force-pushed the int-errors-patch branch 3 times, most recently from 9d98454 to d472c7e Compare January 13, 2017 15:01
@jeandudey
Copy link
Contributor Author

I think 32 bits build cannot be enabled since pthread (for 32 bits) and other Rust required libraries aren't
on Travis CI.

@jeandudey
Copy link
Contributor Author

I tested #35 and i think it should be merged first, since it haves a nice solution for type generation. But it still have these errors when compiling for 32 bits:

   Compiling remacs v0.1.0 (file:///home/jeandudey/rust-projects/remacs/rust_src)
error[E0512]: transmute called with differently sized types: *const libc::c_void (32 bits) to lisp::LispMisc (64 bits)
   --> /home/jeandudey/rust-projects/remacs/rust_src/src/lisp.rs:472:14
    |
472 |     unsafe { mem::transmute(XUNTAG(a, LispType::Lisp_Misc)) }
    |              ^^^^^^^^^^^^^^ transmuting between 32 bits and 64 bits

error[E0512]: transmute called with differently sized types: lisp::LispMisc (64 bits) to *const lisp::LispMiscAny (32 bits)
   --> /home/jeandudey/rust-projects/remacs/rust_src/src/lisp.rs:478:14
    |
478 |     unsafe { mem::transmute(XMISC(a)) }
    |              ^^^^^^^^^^^^^^ transmuting between 64 bits and 32 bits

error[E0512]: transmute called with differently sized types: lisp::LispMisc (64 bits) to *const marker::LispMarker (32 bits)
   --> /home/jeandudey/rust-projects/remacs/rust_src/src/lisp.rs:507:14
    |
507 |     unsafe { mem::transmute(XMISC(a)) }
    |              ^^^^^^^^^^^^^^ transmuting between 64 bits and 32 bits

error: aborting due to 3 previous errors

error: Could not compile `remacs`.

To learn more, run the command again with --verbose.

@jeandudey jeandudey changed the title Fix integers size Fix LispMisc type. Jan 14, 2017
@jeandudey
Copy link
Contributor Author

@Wilfred this is now ready to be merged.

@Wilfred
Copy link
Collaborator

Wilfred commented Jan 14, 2017

Marvellous, thanks for looking at #35 too so we know there isn't overlap.

@Wilfred Wilfred merged commit 74706e6 into remacs:master Jan 14, 2017
jeandudey pushed a commit to jeandudey/remacs that referenced this pull request May 29, 2017
The recent changes to src/casefiddle.c cause build failure as seen
below:

    Starting program: /home/npostavs/src/emacs/emacs-bootstrapping/src/temacs
	--batch --load loadup bootstrap
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Loading loadup.el (source)...
    Using load-path (/home/npostavs/src/emacs/emacs-bootstrapping/lisp
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/emacs-lisp
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/language
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/international
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/textmodes
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/vc)
    Loading emacs-lisp/byte-run (source)...
    Loading emacs-lisp/backquote (source)...
    Loading subr (source)...
    Loading version (source)...
    Loading widget (source)...
    Loading custom (source)...
    Loading emacs-lisp/map-ynp (source)...
    Loading international/mule (source)...
    Loading international/mule-conf (source)...

    lread.c:3914: Emacs fatal error: assertion failed: !NILP (Vpurify_flag)

    Breakpoint 1, terminate_due_to_signal at emacs.c:363
    363	  signal (sig, SIG_DFL);
    (gdb) bt
    #0  0x0000000000579826 in terminate_due_to_signal at emacs.c:363
    remacs#1  0x000000000060ec33 in die at alloc.c:7352
    remacs#2  0x000000000066db40 in intern_c_string_1 at lread.c:3914
    remacs#3  0x0000000000576884 in intern_c_string at lisp.h:3790
    remacs#4  0x00000000005dc84f in prepare_casing_context at casefiddle.c:69
    remacs#5  0x00000000005dd37f in casify_object at casefiddle.c:311
    remacs#6  0x00000000005dd47f in Fcapitalize at casefiddle.c:356
    remacs#7  0x00000000006325ac in eval_sub at eval.c:2219
    remacs#8  0x0000000000632368 in eval_sub at eval.c:2184
    remacs#9  0x000000000063446c in apply_lambda at eval.c:2875
    remacs#10 0x00000000006329af in eval_sub at eval.c:2294
    remacs#11 0x000000000062d462 in Fprogn at eval.c:449
    remacs#12 0x000000000062d4cf in prog_ignore at eval.c:461
    remacs#13 0x000000000062f19c in Fwhile at eval.c:982
    remacs#14 0x00000000006321f4 in eval_sub at eval.c:2172
    remacs#15 0x000000000062d462 in Fprogn at eval.c:449
    remacs#16 0x000000000062f0c4 in Flet at eval.c:963
    remacs#17 0x00000000006321f4 in eval_sub at eval.c:2172
    remacs#18 0x0000000000632963 in eval_sub at eval.c:2290
    remacs#19 0x000000000062d462 in Fprogn at eval.c:449
    remacs#20 0x000000000062f0c4 in Flet at eval.c:963
    remacs#21 0x00000000006321f4 in eval_sub at eval.c:2172
    remacs#22 0x0000000000668caa in readevalloop at lread.c:1927
    remacs#23 0x0000000000667253 in Fload at lread.c:1332
    remacs#24 0x0000000000632683 in eval_sub at eval.c:2233
    remacs#25 0x0000000000668caa in readevalloop at lread.c:1927
    remacs#26 0x0000000000667253 in Fload at lread.c:1332
    remacs#27 0x0000000000632683 in eval_sub at eval.c:2233
    remacs#28 0x0000000000631be5 in Feval at eval.c:2041
    remacs#29 0x000000000057e1af in top_level_2 at keyboard.c:1121
    remacs#30 0x000000000062ffc7 in internal_condition_case at eval.c:1324
    remacs#31 0x000000000057e1f0 in top_level_1 at keyboard.c:1129
    remacs#32 0x000000000062f51e in internal_catch at eval.c:1091
    remacs#33 0x000000000057e0ea in command_loop at keyboard.c:1090
    remacs#34 0x000000000057d6d5 in recursive_edit_1 at keyboard.c:697
    remacs#35 0x000000000057d8b4 in Frecursive_edit at keyboard.c:768
    remacs#36 0x000000000057b55b in main at emacs.c:1687

    Lisp Backtrace:
    "capitalize" (0xffffcf70)
    "format" (0xffffd130)
    "define-charset" (0xffffd370)
    "while" (0xffffd560)
    "let" (0xffffd7c0)
    "dolist" (0xffffd910)
    "let" (0xffffdb70)
    "load" (0xffffdfe0)
    "load" (0xffffe4a0)

* src/casefiddle.c (syms_of_casefiddle): Declare four new symbols:
Qtitlecase, Qspecial_uppercase, Qspecial_lowercase and
Qspecial_titlecase.
(prepare_casing_context): Use aforementioned symbols.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants