You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Cliff Jansen <cl...@gmail.com> on 2013/07/12 02:20:35 UTC

Review Request 10363: fix for non C99 compliant Windows functions

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10363/
-----------------------------------------------------------

Review request for qpid, Andrew Stitcher and Rafael Schloming.


Bugs: proton-212
    https://issues.apache.org/jira/browse/proton-212


Repository: qpid


Description
-------

Provides wrapper functions for sprintf and vsprintf to do the right thing on overflow and argument checking.

Despite the same names the Windows version only provides the same result in the sunny day scenario.

Also includes cmake enforcement via a post build step to verify the qpid-proton library doesn't inadvertently use the non-wrapped versions.

The first try checked for the symbols in the dll, but (some versions of) Visual Studio can insert vsnprintf callouts in the dll support runtime.  This version checks each foo.obj.

Sorry about the stray tariling whitespace.  I'll fix that.


Diffs
-----

  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/CMakeLists.txt 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/codec/codec.c 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/engine/engine.c 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/error.c 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/object/object.c 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/platform.h 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/platform.c 1502397 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99CheckDef.cmake PRE-CREATION 
  http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99SymbolCheck.py PRE-CREATION 

Diff: https://reviews.apache.org/r/10363/diff/


Testing
-------

windows and rhel 6


Thanks,

Cliff Jansen


Re: Review Request 10363: fix for non C99 compliant Windows functions

Posted by Cliff Jansen <cl...@gmail.com>.

> On July 12, 2013, 1:43 p.m., Chug Rolke wrote:
> > http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99SymbolCheck.py, line 46
> > <https://reviews.apache.org/r/10363/diff/2/?file=320710#file320710line46>
> >
> >     Is dumpbin automatically added to the path by the build process or must one run this with Visual Studio tools in the path from the start?

There is no path setup required.  Regardless of whether you launch the gui or use devenv, if the MS build tool can find the compiler it can also find dumpbin.  cmake itself never invokes the python script and dumpbin.


- Cliff


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10363/#review23086
-----------------------------------------------------------


On July 12, 2013, 12:20 a.m., Cliff Jansen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10363/
> -----------------------------------------------------------
> 
> (Updated July 12, 2013, 12:20 a.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Rafael Schloming.
> 
> 
> Bugs: proton-212
>     https://issues.apache.org/jira/browse/proton-212
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> Provides wrapper functions for sprintf and vsprintf to do the right thing on overflow and argument checking.
> 
> Despite the same names the Windows version only provides the same result in the sunny day scenario.
> 
> Also includes cmake enforcement via a post build step to verify the qpid-proton library doesn't inadvertently use the non-wrapped versions.
> 
> The first try checked for the symbols in the dll, but (some versions of) Visual Studio can insert vsnprintf callouts in the dll support runtime.  This version checks each foo.obj.
> 
> Sorry about the stray tariling whitespace.  I'll fix that.
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/CMakeLists.txt 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/codec/codec.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/engine/engine.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/error.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/object/object.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/platform.h 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/platform.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99CheckDef.cmake PRE-CREATION 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99SymbolCheck.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/10363/diff/
> 
> 
> Testing
> -------
> 
> windows and rhel 6
> 
> 
> Thanks,
> 
> Cliff Jansen
> 
>


Re: Review Request 10363: fix for non C99 compliant Windows functions

Posted by Chug Rolke <cr...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10363/#review23086
-----------------------------------------------------------



http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99SymbolCheck.py
<https://reviews.apache.org/r/10363/#comment46878>

    Is dumpbin automatically added to the path by the build process or must one run this with Visual Studio tools in the path from the start?


- Chug Rolke


On July 12, 2013, 12:20 a.m., Cliff Jansen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10363/
> -----------------------------------------------------------
> 
> (Updated July 12, 2013, 12:20 a.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Rafael Schloming.
> 
> 
> Bugs: proton-212
>     https://issues.apache.org/jira/browse/proton-212
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> Provides wrapper functions for sprintf and vsprintf to do the right thing on overflow and argument checking.
> 
> Despite the same names the Windows version only provides the same result in the sunny day scenario.
> 
> Also includes cmake enforcement via a post build step to verify the qpid-proton library doesn't inadvertently use the non-wrapped versions.
> 
> The first try checked for the symbols in the dll, but (some versions of) Visual Studio can insert vsnprintf callouts in the dll support runtime.  This version checks each foo.obj.
> 
> Sorry about the stray tariling whitespace.  I'll fix that.
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/CMakeLists.txt 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/codec/codec.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/engine/engine.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/error.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/object/object.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/platform.h 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/platform.c 1502397 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99CheckDef.cmake PRE-CREATION 
>   http://svn.apache.org/repos/asf/qpid/proton/trunk/tools/cmake/Modules/WindowsC99SymbolCheck.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/10363/diff/
> 
> 
> Testing
> -------
> 
> windows and rhel 6
> 
> 
> Thanks,
> 
> Cliff Jansen
> 
>