From tschmelcher at google.com Thu Oct 14 00:48:08 2010 From: tschmelcher at google.com (Tristan Schmelcher) Date: Wed, 13 Oct 2010 17:48:08 -0700 Subject: Patch to fix bug where arrays of NPIdentifiers were marshalled incorrectly In-Reply-To: <4A5DEC81.8070509@redhat.com> References: <5323d74a0906261645r74c7ca0ib31fef6d7955663b@mail.gmail.com> <4A5DEC81.8070509@redhat.com> Message-ID: Martin, can you check whether or not this patch ever made it in to Fedora? You said a year ago that you added it to the F12 (rawhide) package, but I just discovered that the bug is still present in F12 to this day. On 15 July 2009 07:49, Martin Stransky wrote: > Filled as https://bugzilla.redhat.com/show_bug.cgi?id=511897 > and added to Fedora 12 (rawhide) package. > > > On 06/27/2009 01:45 AM, Tristan Schmelcher wrote: > >> Hello, >> >> I'm a developer on Google's open-source O3D plugin project for doing >> hardware-accelerated 3D rendering in web browsers ( >> http://code.google.com/apis/o3d/). O3D is 32-bit only due to a dependency >> on >> Google's V8 JavaScript JIT engine, so I've been working on compatibility >> with nspluginwrapper so that we can support 64-bit Linux. Along the way I >> discovered that one of the issues was a bug in nspluginwrapper's >> marshalling >> of arrays of NPIdentifiers. A patch with the fix is attached. Apply with >> "patch -p0< FILENAME". >> >> The bug exists in versions 1.2.0 and later. The issue is that >> NPIdentifiers >> are passed to the do_send_NPIdentifier function by _value_, not by >> pointer, >> which is how other parameters are passed to their marshallers. This is >> fine >> when calling rpc_method_send_reply, but it results in a bug when >> marshalling >> arrays of NPIdentifiers, because the array marshalling code in >> rpc_message_send_args passes the individual elements by passing a pointer >> to >> their position in the array. This resulted in do_send_NPIdentifier >> interpreting the address of the NPIdentifier as the NPIdentifier itself. >> As >> a result, nspluginwrapper's implementation of NPN_GetStringIdentifiers was >> broken, because the NPIdentifier values that it returned to the plugin >> were >> mapped to garbage addresses in the browser. >> >> My fix is to change NPIdentifiers to be passed by pointer. With this fix, >> nspluginwrapper can successfully run O3D plugins built from our SVN trunk >> at >> revision 19440 or later. >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Nspluginwrapper-devel-list mailing list >> Nspluginwrapper-devel-list at redhat.com >> https://www.redhat.com/mailman/listinfo/nspluginwrapper-devel-list >> > > _______________________________________________ > Nspluginwrapper-devel-list mailing list > Nspluginwrapper-devel-list at redhat.com > https://www.redhat.com/mailman/listinfo/nspluginwrapper-devel-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: