[so] [Tema 4][Windows] Segmentation fault la iterarea prin coada

Șendre Mihai-Alin mihai.alin.sendre at gmail.com
Sat May 11 11:11:51 EEST 2019


Salut,

Ma tot chinui de ceva ore sa-mi dau seama de ce primesc Segmentation fault.
Am rulat cu drmemory (am pus flag-urile /Zi si /debug) si am eroarea asta:

Error #1: UNADDRESSABLE ACCESS beyond heap bounds: reading
0x0090011c-0x00900120 4 byte(s)
# 0 libscheduler.dll!threadfunc
[c:\users\student\desktop\tema4_so\so-assignments-master\4-scheduler\checker-win\so_scheduler.c:322]
# 1 KERNEL32.dll!BaseThreadInitThunk +0x11     (0x768d1174
<KERNEL32.dll+0x51174>)
Note: @0:00:00.988 in thread 4256
Note: next higher malloc: 0x00900120-0x00900138
Note: prev lower malloc:  0x009000f8-0x009000fc
Note: instruction: mov    (%eax,%ecx,4) -> %edx

Linia mentionata de drmemory (322) este o linie in care iau head-ul cozii
de thread-uri:

                  qhead = queue_array->queues[i].head;

Am folosit calloc peste tot, am pus head-ul la NULL etc. Am ramas fara
inspiratie, ma puteti ajuta cu ceva hint-uri? De asemenea faptul ca acelasi
cod functioneaza pe Linux fara nicio problema nu ma ajuta deloc.

Multumesc anticipat,
Mihai-Alin Șendre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20190511/a7d87c90/attachment.html>


More information about the so mailing list