Just wanted to report a fix I found for an issue I was having with ARSperl 
running on Windows 7 and 2008.
 
I compiled the module using Strawberry Perl with the 7.6.4 version of the 
Remedy API, and found that test scripts would run as expected on Windows XP or 
2003, but that perl would crash on Windows 7 or 2008 reporting an issue with 
ntdll.dll. I tried different versions of the Remedy API, but hit the same 
problem.
 
The crash would occur when trying to use the ars_setEntry function, but would 
only occur when using string fields, not numerical fields.
 
Looking through the source, I tracked down the issue to the sv_to_ARValue, and 
specifically the use of strdup. It seems that some functionality has changed in 
Windows somewhere that means when strdup is allocating memory, it's not 
creating it on general heap? That's all I can assume, as when the code hit the 
call to FreeARFieldValueList, that's when the crash would actually occur.
 
The workaround has been to update the supportrev.h and supportrev.c files to 
ensure that the arsperl_strdup function is available when compiling on Windows, 
not just when compiling on Windows with a non-GNU C compiler. As the 
arsperl_strdup function then replaces strdup, this fixed the problem, and 
scripts using ars_SetEntry (ars_CreateEntry and ars_MergeEntry would be 
affected too by the looks of it) now work correctly on all version of Windows 
that I've been able to test on.
 
Just wanted to pass this on in case it will help others who hit the same 
problem!
 
Regards,
 
Glyn                                      
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

--
Arsperl-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to