static SysRes sys_modify_ldt ( ThreadId tid,
Int func, void* ptr, UInt bytecount )
{
- SysRes ret;
+ /* Set return value to something "safe". I think this will never
+ actually be returned, though. */
+ SysRes ret = VG_(mk_SysRes_Error)( VKI_ENOSYS );
if (func != 0 && func != 1 && func != 2 && func != 0x11) {
ret = VG_(mk_SysRes_Error)( VKI_ENOSYS );
vg_assert(8 == sizeof(VexGuestX86SegDescr));
vg_assert(sizeof(HWord) == sizeof(VexGuestX86SegDescr*));
- if (info == NULL || ! ML_(safe_to_deref)(info, sizeof(vki_modify_ldt_t)))
+ if (info == NULL || ! ML_(safe_to_deref)(info, sizeof(vki_modify_ldt_t))) {
+ VG_(umsg)("Warning: bad u_info address %p in set_thread_area\n", info);
return VG_(mk_SysRes_Error)( VKI_EFAULT );
+ }
gdt = (VexGuestX86SegDescr*)VG_(threads)[tid].arch.vex.guest_GDT;
vg_assert(sizeof(HWord) == sizeof(VexGuestX86SegDescr*));
vg_assert(8 == sizeof(VexGuestX86SegDescr));
- if (info == NULL || ! ML_(safe_to_deref)(info, sizeof(vki_modify_ldt_t)))
+ if (info == NULL || ! ML_(safe_to_deref)(info, sizeof(vki_modify_ldt_t))) {
+ VG_(umsg)("Warning: bad u_info address %p in get_thread_area\n", info);
return VG_(mk_SysRes_Error)( VKI_EFAULT );
+ }
idx = info->entry_number;
by 0x........: main (scalar.c:1084)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
+Warning: bad u_info address 0x........ in set_thread_area
-----------------------------------------------------
244:__NR_get_thread_area 1s 1m
-----------------------------------------------------
by 0x........: main (scalar.c:1088)
Address 0x........ is not stack'd, malloc'd or (recently) free'd
+Warning: bad u_info address 0x........ in get_thread_area
-----------------------------------------------------
245: __NR_io_setup 2s 1m
-----------------------------------------------------