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

remove useless rust_main wrapper #9284

Merged
merged 1 commit into from
Sep 18, 2013
Merged

remove useless rust_main wrapper #9284

merged 1 commit into from
Sep 18, 2013

Conversation

thestinger
Copy link
Contributor

the real entry point will now pass the user's main function directly to
the scheduler

the real entry point will now pass the user's main function directly to
the scheduler
bors added a commit that referenced this pull request Sep 18, 2013
the real entry point will now pass the user's main function directly to
the scheduler
@bors bors closed this Sep 18, 2013
@bors bors merged commit c0cc37b into rust-lang:master Sep 18, 2013
@alexcrichton
Copy link
Member

I think that this broke rusti completely. Cc @mrordinaire, @glycerine (the _rust_main entry point no longer exists)

@thestinger thestinger deleted the main branch September 19, 2013 18:53
@glycerine
Copy link

rusti compiles and starts for me, but a simple let does fail currently:

jaten@i7:/usr/cn/rust/github-master/rust$ rustc -v
rustc 0.8-pre (755f622 2013-09-19 09:55:59 -0700)
host: x86_64-unknown-linux-gnu

jaten@i7:/usr/cn/rust/github-master/rust$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> let b = 12;
error: internal compiler error: node_id_to_type: no type for node unknown node (id=-1)
task failed at 'explicit failure', /usr/cn/rust/github-master/rust/src/libsyntax/diagnostic.rs:95
rusti>

@alexcrichton
Copy link
Member

It didn't hit this error because it never hit the JIT, if it hit the JIT I believe it'd hit this error (maybe some other bugs were introduced along the way as well).

@glycerine
Copy link

Indeed:

jaten@i7:/usr/cn/rust/github-master/rust/src/librusti$ ulimit -c unlimited
jaten@i7:/usr/cn/rust/github-master/rust/src/librusti$ rusti
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> fn five() -> int { 5 }
rusti> five()
Segmentation fault (core dumped)
jaten@i7:/usr/cn/rust/github-master/rust/src/librusti$ gdb rusti core
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/local/bin/rusti...(no debugging symbols found)...done.
[New LWP 19549]
[New LWP 19553]
[New LWP 19548]
[New LWP 19552]
[New LWP 19551]
[New LWP 19555]
[New LWP 19554]
[New LWP 19550]
[New LWP 19556]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `rusti'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f164bb3dfa7 in SignalHandler(int) ()
   from /usr/local/bin/../lib/./librustllvm.so
(gdb) bt
#0  0x00007f164bb3dfa7 in SignalHandler(int) ()
   from /usr/local/bin/../lib/./librustllvm.so
#1  <signal handler called>
#2  0x00007f164d1f2e5d in calloc () from /usr/local/bin/../lib/librustrt.so
#3  0x00007f164f7f257e in _dl_new_object (
    realname=0x7f1644762380 "/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8-pre.so",
    libname=0x7f1644762320 "/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8-pre.so", type=2, loader=0x0,\
 mode=-1879047935,
    nsid=0) at dl-object.c:77
#4  0x00007f164f7ed806 in _dl_map_object_from_fd (
    name=0x7f1644762320 "/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8-pre.so", fd=38, fbp=0x7f1647a46\
850,
    realname=0x7f1644762380 "/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8-pre.so", loader=0x0, l_type\
=2, mode=-1879047935,
    stack_endp=0x7f1647a46bb0, nsid=0) at dl-load.c:1051
#5  0x00007f164f7ef69a in _dl_map_object (loader=0x0,
    name=0x7f1644762320 "/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8-pre.so", type=2, trace_mode=0, \
mode=-1879047935,
    nsid=<optimized out>) at dl-load.c:2568
#6  0x00007f164f7fa84b in dl_open_worker (a=0x7f1647a46de0) at dl-open.c:225
#7  0x00007f164f7f6176 in _dl_catch_error (objname=0x7f1647a46e28,
    errstring=0x7f1647a46e30, mallocedp=0x7f1647a46e3f,
    operate=0x7f164f7fa700 <dl_open_worker>, args=0x7f1647a46de0)
    at dl-error.c:178
#8  0x00007f164f7fa31a in _dl_open (
    file=0x7f1644762320 "/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8-pre.so", mode=-2147483391,
    caller_dlopen=0x7f164bb27a1a, nsid=-2, argc=1, argv=<optimized out>,
    env=0x7fff12535c78) at dl-open.c:639
#9  0x00007f164cc14f26 in dlopen_doit (a=0x7f1647a47000) at dlopen.c:67
#10 0x00007f164f7f6176 in _dl_catch_error (objname=0x7f16446ca5d0,
    errstring=0x7f16446ca5d8, mallocedp=0x7f16446ca5c8,
    operate=0x7f164cc14ec0 <dlopen_doit>, args=0x7f1647a47000)
    at dl-error.c:178
#11 0x00007f164cc1552f in _dlerror_run (operate=0x7f164cc14ec0 <dlopen_doit>,
    args=0x7f1647a47000) at dlerror.c:164
#12 0x00007f164cc14fc1 in __dlopen (file=<optimized out>,
    mode=<optimized out>) at dlopen.c:88
#13 0x00007f164bb27a1a in llvm::sys::DynamicLibrary::getPermanentLibrary(char const*, std::string*) () from /usr/local/bin/../lib/./li\
brustllvm.so
#14 0x00007f164ad7161c in RustMCJITMemoryManager::loadCrate (
    this=0x7f164785c300, file=<optimized out>, err=err@entry=0x7f1647a470e0)
    at /usr/cn/rust/github-master/rust/src/rustllvm/RustWrapper.cpp:130
#15 0x00007f164ad71ec7 in LLVMRustLoadCrate (mem=<optimized out>,
    crate=<optimized out>)
    at /usr/cn/rust/github-master/rust/src/rustllvm/RustWrapper.cpp:267
#16 0x00007f164dded5b6 in back::link::jit::exec::hd7e29717823fb1e1aS::v0.8$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a\
7a7-0.8-pre.so
#17 0x00007f164ddef481 in back::link::write::run_passes::hd81d8df2ee116b38aE::v0.8$x2dpre () from /usr/local/bin/../lib/librustc-d3cb8\
c2ccd84a7a7-0.8-pre.so
#18 0x00007f164de5a758 in driver::driver::phase_5_run_llvm_passes::anon::expr_fn::aH () from /usr/local/bin/../lib/librustc-d3cb8c2ccd\
84a7a7-0.8-pre.so
#19 0x00007f164dbe086e in util::common::time::hc4d0513e54dc658eaU::v0.8$x2dpre
    () from /usr/local/bin/../lib/librustc-d3cb8c2ccd84a7a7-0.8-pre.so
#20 0x00007f164de5a4c1 in driver::driver::phase_5_run_llvm_passes::h63771ec2b2c8f3aT::v0.8$x2dpre ()
#21 0x00007f164d4b62e3 in run::hc936b45c5d8bcde9at::v0.8$x2dpre ()
   from /usr/local/bin/../lib/librusti-53e0ef2ae196aaff-0.8-pre.so
#22 0x00007f164d4d7785 in run_line::anon::expr_fn::a7 ()
   from /usr/local/bin/../lib/librusti-53e0ef2ae196aaff-0.8-pre.so
#23 0x00007f164d4d4c2f in task::TaskBuilder::try::anon::expr_fn::_8kaTav ()
   from /usr/local/bin/../lib/librusti-53e0ef2ae196aaff-0.8-pre.so
#24 0x00007f164ef67000 in task::spawn::spawn_raw::anon::expr_fn::at ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#25 0x00007f164efac550 in rt::task::__extensions__::build_start_wrapper::anon::anon::expr_fn::aY ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#26 0x00007f164efaaa87 in rt::task::__extensions__::run::anon::expr_fn::ag ()
   from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#27 0x00007f164d1e4b53 in rust_try (f=<optimized out>, fptr=<optimized out>,
    env=<optimized out>)
    at /usr/cn/rust/github-master/rust/src/rt/rust_builtin.cpp:523
#28 0x00007f164efaa9bc in rt::task::Unwinder::try::h199ab8d6eb226980b9af::v0.8$x2dpre () from /usr/local/bin/../lib/libstd-6c65cf4b443\
341b1-0.8-pre.so
#29 0x00007f164efaa831 in rt::task::Task::run::h199ab8d6eb226980iXae::v0.8$x2dpre () from /usr/local/bin/../lib/libstd-6c65cf4b443341b\
1-0.8-pre.so
#30 0x00007f164efac13c in rt::task::__extensions__::build_start_wrapper::anon::expr_fn::aP () from /usr/local/bin/../lib/libstd-6c65cf\
4b443341b1-0.8-pre.so
#31 0x0000000000000000 in ?? ()
(gdb) 

flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 11, 2022
fix typo in tests/ui/redundant_allocation.rs

changelog: none
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.

4 participants