× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Sat, 2016-02-13 at 07:14 -0600, Bradley Stone wrote:
Good points, Jonathan. I think I'm getting too used to strings in
Javascript.. :)

I guess what I found odd was, as long as the variable was 257 bytes or more
it seemed to work fine (like maybe it allocated more memory than the size
of the variable used)

I think, but am not totally sure, that there are some things that can
trigger exceptions... it doesn't do runtime bounds checking, as far as I
know, but stomping over some types of memory or exceeding some types of
memory storage can issue exceptions. I vaguely recall that memory has a
hidden bit (or link, or something!) to the program/job its assigned to
so stomping over data memory is fine just as long as it all belongs to
the job and is "normal" data, but stomping into program code or memory
not assigned to the job or memory containing pointer throws a wobbly.

I also recall, even more vaguely, that a jobs/program "data" memory is
surrounded by "something" that also helps to prevent memory stomping.
Something along the lines of my earlier example, surrounded by special
bytes with a special bit not set that if stomped on triggers a read only
memory exception or some such.

I may be, quite possibly am, totally wrong in the above... as its
something I read many years ago in relation to the single level storage,
possibly even in a news/400 printed article back many years ago and my
memory is very hazy.

Actually thinking about it further... your exception is related to a
pointer, so possibly given the right circumstances based on the length
of the caller variable, your caller is corrupting a pointer (or trying
to) that is then pointing to memory thats not valid and its only by
chance that that pointer is referenced and then noticing the corruption;
or something!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.