Bug 511897

Summary: Patch to fix bug where arrays of NPIdentifiers were marshalled incorrectly
Product: [Fedora] Fedora Reporter: Martin Stransky <stransky>
Component: nspluginwrapperAssignee: Martin Stransky <stransky>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: caillon, stransky, tristan_schmelcher, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-04 10:54:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch none

Description Martin Stransky 2009-07-15 14:48:29 UTC
Created attachment 353833 [details]
patch

Description of problem (by Tristan Schmelcher):

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.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tristan Schmelcher 2009-10-30 12:37:47 UTC
What's the status of this issue? Martin told me in the original thread about this that he committed the patch to the Fedora 12 package, but this bug is still open and the patch doesn't seem to have made it into http://svn.beauchesne.info/svn/gwenole/projects/nspluginwrapper/trunk

Comment 2 Martin Stransky 2009-10-30 20:27:19 UTC
Yeah, you have to urge Gwelone for that...I have this bug open only for tracking purposes/documentation.

Comment 3 Bug Zapper 2009-11-16 10:59:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Tristan Schmelcher 2010-10-14 00:45:46 UTC
Martin told me back when he filed this that he also added the patch to the rawhide package, but I just discovered that the bug is still present in F12. Was this patch ever integrated into Fedora? This is preventing Google voice and video chat from working properly. :(

Comment 5 Martin Stransky 2010-10-14 06:53:04 UTC
I see the patch in nspluginwrapper-1.3.0-10.fc12, it was added to nspluginwrapper-1.3.0-7.

Comment 6 Tristan Schmelcher 2010-10-14 17:57:56 UTC
Oops, my mistake. I thought I was using 1.3.0-10.fc12 but it turns out that I had accidentally clobbered some of the files on disk with another version. With a clean install of 1.3.0-10.fc12 everything works fine.

Comment 7 Bug Zapper 2010-11-04 10:45:50 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping