Code Monkey home page Code Monkey logo

ics2015's Issues

Keyboard event may cause nemu deadlock

My backtrace:

The executable is obj/game/game.
For help, type "help"
(nemu) c
.�[kernel/src/main.c,74,init_cond] {kernel} Hello, NEMU world!
.....................................^C
Program received signal SIGINT, Interrupt.
0x00007ffff651f66b in __lll_lock_wait_private () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff651f66b in __lll_lock_wait_private () from /usr/lib/libc.so.6
#1  0x00007ffff64a547a in malloc () from /usr/lib/libc.so.6
#2  0x00007ffff51a7fcc in ?? () from /usr/lib/libxcb.so.1
#3  0x00007ffff51a8548 in ?? () from /usr/lib/libxcb.so.1
#4  0x00007ffff53ffdc8 in ?? () from /usr/lib/libX11.so.6
#5  0x00007ffff53fff2b in ?? () from /usr/lib/libX11.so.6
#6  0x00007ffff540023d in _XEventsQueued () from /usr/lib/libX11.so.6
#7  0x00007ffff53e248a in XFlush () from /usr/lib/libX11.so.6
#8  0x00007ffff7390938 in ?? () from /usr/lib/libSDL-1.2.so.0
#9  0x00007ffff739214b in ?? () from /usr/lib/libSDL-1.2.so.0
#10 0x00007ffff736706c in SDL_PumpEvents () from /usr/lib/libSDL-1.2.so.0
#11 0x00007ffff73670a9 in SDL_PollEvent () from /usr/lib/libSDL-1.2.so.0
#12 0x0000000000430856 in device_update.lto_priv ()
#13 <signal handler called>
#14 0x00007ffff64a378e in _int_malloc () from /usr/lib/libc.so.6
#15 0x00007ffff64a53d4 in malloc () from /usr/lib/libc.so.6
#16 0x00007ffff76800e8 in operator new (sz=31) at /build/gcc-multilib/src/gcc-5-20160209/libstdc++-v3/libsupc++/new_op.cc:50
#17 0x00007ffff7711bed in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve (this=0x7fffffffd870, __res=<optimized out>)
    at /build/gcc-multilib/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:297
#18 0x000000000043a180 in print_instr(InstructionContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) ()
#19 0x0000000000422827 in int push<(OperandName)15>(InstructionContext&, unsigned int) [clone .lto_priv.73] ()
#20 0x000000000042efd5 in cpu_exec ()
#21 0x000000000043b2ae in cmd_c.lto_priv ()
#22 0x000000000040b3ae in main ()
(gdb) 

The signal came when in malloc(), and the handler called malloc() again so it sucks...

make的问题

gcc 6.1 在3.6的时候(实现加载程序的loader),make kernel会报错,会编译kernel/src/fs/fs.c,报错信息如下:
error: ‘file_table’ defined but not used [-Werror=unused-const-variable=]
static const file_info file_table[] = {
cc1: all warnings being treated as errors
make: *** [kernel/Makefile.part:3: obj/kernel/fs/fs.o] Error 1

但是在gcc 4.9.2的情况下不会报错

neg指令需要更新cf标志

neg指令需要更新cf标志,如果不更新,在对long long型整数进行取负时会发生错误,因为gcc会将取负编译成neg指令后紧接着一条adc指令。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.