ppisa commented on issue #18566:
URL: https://github.com/apache/nuttx/issues/18566#issuecomment-5153681369
I have compiled NuttX for x86_64 QEMU with Nano-X options and I receive
fault due attempt to dereference -1 pointer in
```
Breakpoint 2, getumask () at misc/lib_umask.c:82
82 info = task_get_info();
(gdb) n
83 return info->ta_umask;
(gdb) p info
$5 = (struct task_info_s *) 0xffffffffffffffff
```
The call stack is
```
#0 getumask () at misc/lib_umask.c:83
#1 0x00000001009422cc in nx_vopen (list=0x100a295e0, path=0x100a01d80 <buf>
"fonts/mwfonts.alias",
oflags=32, ap=0x100a61d28) at vfs/fs_open.c:295
#2 0x00000001009426d0 in open (path=0x100a01d80 <buf>
"fonts/mwfonts.alias", oflags=32)
at vfs/fs_open.c:454
#3 0x00000001009de283 in fopen (path=0x100a01d80 <buf>
"fonts/mwfonts.alias", mode=0x1009ef824 "r")
at stdio/lib_fopen.c:180
#4 0x00000001009b1f5f in mwfont_findalias (fontname=0x100a62158
"SystemFixed", height=0x100a61e9c,
width=0x100a61e98)
at
/home/pi/repo/nuttx/gsoc-mwin/apps/graphics/microwindows/microwindows/src/engine/devfont.c:88
#5 0x00000001009b21a1 in GdCreateFont (psd=0x1009f2c20 <scrdev>,
name=0x100a62158 "SystemFixed",
height=0, width=0, plogfont=0x0)
at
/home/pi/repo/nuttx/gsoc-mwin/apps/graphics/microwindows/microwindows/src/engine/devfont.c:176
#6 0x00000001009bdbd6 in SVR_GrCreateFontEx (name=0x100a62158
"SystemFixed", height=0, width=0,
plogfont=0x0) at microwindows/src/nanox/srvfunc.c:1459
#7 0x0000000100978a3c in GrCreateFontExWrapper (r=0x100a62150)
at microwindows/src/nanox/srvnet.c:817
#8 0x000000010097b10e in GsHandleClient (fd=7) at
microwindows/src/nanox/srvnet.c:2268
#9 0x0000000100976754 in GsSelect (timeout=0) at
microwindows/src/nanox/srvmain.c:549
#10 0x0000000100975fa7 in nanox_server_main (argc=1, argv=0x100a61b68)
at microwindows/src/nanox/srvmain.c:192
#11 0x000000010092343f in nxtask_startup (entrypt=0x100975c1d
<nanox_server_main>, argc=1,
argv=0x100a61b68) at sched/task_startup.c:72
#12 0x000000010090d2e0 in nxtask_start () at task/task_start.c:104
#13 0x873d01b80000122c in ?? ()
```
May it be that I have something strange in the
[defconfig](https://github.com/user-attachments/files/30623876/defconfig-usb-kbd-nxterm.txt)
, I attempt to start `nanoxterm` from serial console.
I start QEMU by
```
qemu-system-x86_64 -m 2G -s \
-enable-kvm \
-smp 1 \
-cpu host,+pcid,+x2apic,+tsc-deadline,+xsave,+rdrand \
-kernel "$SYSTEM_IMAGE" \
-device qemu-xhci -device usb-kbd -device usb-mouse \
-vga cirrus
```
and when it is running, I attach from GDB
```
gdb-multiarch \
-ex "target extended-remote :1234" \
-ex "b x86_64_fault_panic_isr" \
nuttx/nuttx
```
set breakpoints, continue and invoke `nanoxterm`. But may be I have
something broken on my side. But `mwexample` worked for me before switch. May
it be it is necessary to mount some tmpfs or something else? May be some stack
to small etc.
PS: I am on vacations out Internet reach during next week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]