help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

creating a segfault in a translator (on purpose)


From: Greg Buchholz
Subject: creating a segfault in a translator (on purpose)
Date: Wed, 5 Feb 2003 10:06:20 -0800 (PST)

I've been reading the Hurd Hacking Guide since I am
interested in making some of my own translators.  When
I came across the trivfs example, I was quite
perplexed about the trivfs_S_io_read section in which
you mmap a buffer for the data, but you don't have to
free it.  So I scoured the 'Net, and found out that
this is the way it is supposed to work; someone else
will free the memory for me.  Then my devious mind
asked, "what happens if I pass back a pointer that
can't be freed?"  Say I use alloca or automatic
arrays, what happens then?  Well, it turns out that
the translator dies (no surprise) with the message
"Resource Lost".  What you also get is a 16MB core
file (from the server that tried to free the memory, I
presume), along with a flaky system that has a
tendency to reboot itself within a couple of minutes,
if not immediately.  So I was wondering if the hurd
hackers out there thought that this was the expected
behavior, considering that my kernel is v0.3 from the
J2 disk series.


Thanks,

Greg Buchholz









.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]