isc_que_events callback function randomly return invalid Update Buffer ----------------------------------------------------------------------
Key: CORE-5254 URL: http://tracker.firebirdsql.org/browse/CORE-5254 Project: Firebird Core Issue Type: Bug Components: API / Client Library Affects Versions: 2.5.4 Environment: Windows 7 Ultimate, Firebird 2.5.4, Embarcadero RAD XE2 Reporter: Mahmudv Ilgar Priority: Critical I use POST EVENT in triggers and stored procedures. For catching events I try use FIBPlus, but found AV when registering/unregistering Events (50 % times in application staring/closing). I write my own component (similar to FIBPlus super alerter and IBEvents) and found that EventBuffer used in res = Parent->Database->ClientLibrary->isc_que_events(StatusVector, &DBH, &EventID, EventBufferLen, EventBuffer, (TISC_CALLBACK)EventCallback, PVoid)this); in sometimes corrupt, because of in EventCallback function receive invalid Updated, witch copied to ResulBuffer and after isc_event_counts copied to EventBuffer void EventCallback(void *Ptr, short Length, unsigned char *Updated) { if (Ptr && Updated) { TMxFBEventsBlockListener *T = (TMxFBEventsBlockListener *)Ptr; T->UpdateResultBuffer(Length, Updated); T->SignalEvent(); } } //--------------------------------------------------------------------------- void __fastcall TMxFBEventsBlockListener::UpdateResultBuffer(short Length, unsigned char *Updated) { if (Length == EventBufferLen && Updated[0] == 1) memcpy(ResultBuffer, Updated, Length); else // ---------------------------------------------------> INVALID UPDATED { memcpy(ResultBuffer, EventBuffer, EventBufferLen); // bFirstTime = true; Parent->DoError("MxFBEventsAlerter: Invalid Updated buffer ="+IntToStr(Length), 0); } } This is floating error. You can 100 times unregister and register again same event list and see this error 20-50 times. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel