Hi,

My coworker recently had an ODP crash (he used the most recent api-next), 
apparently related to not having "@" in CPU string. The CPU string is:

$ cat /proc/cpuinfo |grep Xeon|uniq -c
      8 model name      : Intel Xeon E312xx (Sandy Bridge)

This is a virtualized environment (KVM running on CentOS).

The segfault happens at the second of these two lines in odp_cpuinfo_parser:

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

So, should this odp_cpuinfo_parser be modified to work even in cases that there 
is no "@" in the CPU string?

I would submit a patch, but I'm not entirely sure how the code should be fixed. 
It seems incorrect in assuming that strchr always finds a match.

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

Reply via email to