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

'exception Lexer.Lex_err("bad trailing utf-8 byte", _)' compiling test/run-pass/utf8.rs #101

Closed
jorendorff opened this issue Jul 10, 2010 · 4 comments

Comments

@jorendorff
Copy link
Contributor

$ git clone http://github.com/graydon/rust.git rust-2
$ cd rust-2/src
$ make && make check
...
compile [x86]: test/run-pass/uint.rs
compile [x86]: test/run-pass/unit.rs
compile [x86]: test/run-pass/user.rs
compile [x86]: test/run-pass/utf8.rs
Fatal error: exception Lexer.Lex_err("bad trailing utf-8 byte", _)
Raised at file "boot/fe/lexer.mll", line 17, characters 12-30
Called from file "boot/fe/parser.ml", line 240, characters 22-50
Called from file "boot/fe/item.ml", line 87, characters 10-17
Called from file "boot/fe/parser.ml", line 164, characters 13-17
Called from file "boot/fe/item.ml", line 110, characters 14-68
Called from file "boot/fe/parser.ml", line 164, characters 13-17
Called from file "boot/fe/item.ml", line 464, characters 12-61
Called from file "boot/fe/parser.ml", line 164, characters 13-17
Called from file "boot/fe/parser.ml", line 312, characters 15-25
Called from file "boot/fe/parser.ml", line 164, characters 13-17
Called from file "boot/fe/item.ml", line 66, characters 8-113
Called from file "boot/fe/parser.ml", line 164, characters 13-17
Called from file "boot/fe/item.ml", line 678, characters 15-45
Called from file "boot/fe/parser.ml", line 164, characters 13-17
Called from file "boot/fe/item.ml", line 806, characters 24-75
Called from file "boot/fe/item.ml", line 1151, characters 28-45
Called from file "boot/fe/cexp.ml", line 736, characters 22-49
Called from file "boot/fe/cexp.ml", line 598, characters 4-12
Called from file "boot/driver/main.ml", line 255, characters 14-119
Called from file "boot/driver/session.ml", line 60, characters 10-17
Called from file "boot/driver/main.ml", line 242, characters 2-1697
make: *** [test/run-pass/utf8.x86] Error 2

The UTF-8 in the test file looks fine to me.

@graydon
Copy link
Contributor

graydon commented Jul 11, 2010

Huh, odd. I've not seen that before. Can you describe your current platform? OS, ocaml versions, that kind of thing?

@jorendorff
Copy link
Contributor Author

I'm on OS X 10.5.8. rustboot generates good executables.

~/dev/rust/src$ g++ -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5488~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5488)

~/dev/rust/src$ ocaml -version
The Objective Caml toplevel, version 3.11.2

~/dev/rust/src$ ocamlc -v
The Objective Caml compiler, version 3.11.2
Standard library directory: /opt/local/lib/ocaml

~/dev/rust/src$ uname -a
Darwin mozmac-2.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

@graydon
Copy link
Contributor

graydon commented Jan 27, 2011

Can you still reproduce this? I've seen nothing like this since you reported it.

@brson
Copy link
Contributor

brson commented May 24, 2011

Closing rustboot bug

@brson brson closed this as completed May 24, 2011
oli-obk pushed a commit to oli-obk/rust that referenced this issue Jul 19, 2017
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Expose functionality to get peer credentials for a Unix socket on Linux
kazcw pushed a commit to kazcw/rust that referenced this issue Oct 23, 2018
The i586 targets on x86 are defined to be 32-bit and lacking in sse/sse2 unlike
the i686 target which has sse2 turned on by default. I was mostly curious what
would happen when turning on this target, and it turns out quite a few tests
failed!

Most of the tests here had to do with calling functions with ABI mismatches
where the callee wasn't `#[inline(always)]`. Various pieces have been updated
now and we should be passing all tests.

Only one instruction assertion ended up changing where the function generates a
different instruction with sse2 ambiently enabled and without it enabled.
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Types chapter cleanup and new sections
djtech-dev pushed a commit to djtech-dev/rust that referenced this issue Dec 9, 2021
Add ptr_type and array_type to BasicType
bjorn3 pushed a commit to bjorn3/rust that referenced this issue Dec 31, 2021
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Correct fat pointer generation by codegen_rvalue_ref

Also restore the SizeAndAlignOfDst regression that now passes.

* Respond to code review on correct fat pointer in codegen rvalue ref

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
jaisnan pushed a commit to jaisnan/rust-dev that referenced this issue Oct 15, 2024
…#101)

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.

---------

Signed-off-by: Felipe R. Monteiro <felisous@amazon.com>
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

No branches or pull requests

3 participants