Win32 System calls from multiple threads - "The Data area passed to a system call is too small"
This one is easy to repeat. Go into the IDE, LW6 (or LW5.1 it worked
there too) and run:
(loop for i from 1 to 10 do
(mp:process-run-function
(format nil "Test Thing ~A" i)
nil
(lambda () (loop for j from 1 do
(system:get-user-profile-directory)))))
To be honest, it repeats for me with 2 (I put in 10 for good measure).
Any collision causes the error.
If I serialize the system calls, of course, the problem goes away
(irrespective of thread count).
I'm asking here if there is a workaround for this, some initial step or
per-thread setup I can do. I was hesitant to write this up as a bug
until I understand it better - this may be an inherent attribute of
certain Windows system calls (worst case, perhaps, have the runtime try
to serialize them?)
My platform:
LW6.0 32-bit, on Vista 64 on a Quad-core Intel