[so] [Tema1][Linux] stack smash detected

Ionutz Sc ionut_sc94 at yahoo.com
Tue Mar 14 20:44:40 EET 2017


Buna seara,
Pe linux, cand testez tema cu comanda "valgrind ./tema1 256 < date.in" (date.in contine primele 3 linii din testul 22), valgrind nu seziseaza niciun leak de memorie:
All heap blocks were freed -- no leaks are possible
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
insa la output apare si *** stack smashing detected ***: ./tema1 terminatedNu reusesc sa-mi dau seama ce anume provoaca stack smashing-ul.Am testat in loc de linia cu print_bucket si cu un sir de caractere random de genul:
asdadfasda asdasdasdasd asdasdasdasdAm observat ca daca las doar 2 cuvinte random pe acea linie, nu face stack smashing, doar cu 3 face.
Multumesc anticipat!

Cu stima,Ionut Niculici
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20170314/f487f3a2/attachment.html>


More information about the so mailing list