× 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 8/18/2015 4:42 AM, Wilson, Jonathan wrote:
...
You mention corruption... I'm curious as to just how bad that corruption
might be, so I have a few follow on questions.

Lets forget pointers for a min, and assume normal parameter passing
(which uses pointers under the hood).

JOB1 does a procedure call, passing as parm1 a 3 char field.

The called procedure wants a 20KiB string but somehow the programs
compiled (const?) and are fully executable.

The called procedure does a eval parm1 = verylongstring.

Now assuming it doesn't some how get a run time error, what is the worst
that could happen?

It depends what gets corrupted. If you're lucky it will get an exception before the program does something it's not supposed to do.

...
What if the data is data, not code, is it possible for one job to stomp
over another jobs data?

No, that's not possible. Well, I think it would be possible if parameter you passed was based on a pointer to a user space that some other job was also working with, but you probably wouldn't need a parameter-mismatch situation for that to be a problem.


If I use pointers, is it possible to pass pointers between jobs to see
another jobs data? Can you even do BasedPointerField = AValue? or does
it require AValue to be another basedpointer field? (What about other
languages?)

No, that's not possible. Or, to be precise, not possible for ordinary programs like we write. I recall hearing about some APIs that IBM added some releases ago to make up for the fact that MI programs that had formerly been able to access storage in another job were no longer able to do that. If I recall correctly, the APIs allowed some very specific types of access to specific types of jobs, not general access to any storage in any job.


If job1/pgm1 stores its data at address0101 and job2/pgm5 stores its
data at address0102 and job1/pgm1 somehow manages to clear
address0101-address0107 does it wipe out the data from job2/pgm5 or is
there some magic that protects job memory from other jobs, even though
its all "one huge single level storage". (note in this case its memory
(heap?) storage, as opposed to somehow getting a pointer to a pgm object
and treating it as memory which as far as I can tell is not possible)

I'm pretty sure that what you describe isn't possible, but that's way outside my area of expertise.


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.