Hi Experts,

I met an ODP crash in linux generic.
It crashes at requiring the CPU frequency.

pos = strchr(sysinfo->model_str[id], '@');
*(pos - 1) = '\0';

My testbed is an ubuntu running on KVM, and the CPU model is:
"model name : QEMU Virtual CPU version 2.0.0"

There is no “@" in this string and pos is not a valid pointer.

Did I meet any bug or limitation? Does anyone test ODP on KVM before?


The detailed backtrace is:

(gdb) bt
#0  odp_cpuinfo_parser (file=file@entry=0x7a7950,
    sysinfo=sysinfo@entry=0x7ffff7b86610 <odp_global_data+16>) at
arch/x86/odp_sysinfo_parse.c:27
#1  0x00007ffff7975842 in odp_system_info_init () at odp_system_info.c:198
#2  0x00007ffff796404d in odp_init_global (params=<optimized out>,
    platform_params=<optimized out>) at odp_init.c:34
#3  0x0000000000412720 in main_test (argc=10, argv=0x7fffffffe658)
    at ../../src/main_dpdk.cpp:4091
#4  0x0000000000411ca4 in main (argc=10, argv=0x7fffffffe658) at
../../src/main_dpdk.cpp:3876


user@vTRex:~/odp-linux/platform/linux-generic$ sudo cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 6
model name : QEMU Virtual CPU version 2.0.0
stepping : 3
microcode : 0x1
cpu MHz : 2294.458
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36
clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 x2apic
popcnt hypervisor lahf_lm abm vnmi ept
bogomips : 4588.91
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

Thanks,
Wenxian
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to