[Libreoffice-commits] core.git: Changes to 'refs/changes/07/2607/2'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/45/2045/2'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/45/2045/1'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/08/2608/1'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/07/2607/1'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/08/2608/2'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/64/864/1'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/2609/2'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/2609/1'

2014-09-29 Thread Marc-André Laverdière

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svtools/source

2013-03-11 Thread Marc-André Laverdière
 svtools/source/contnr/treelist.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 884e052395e4e28212d8f3744382713405d04eb8
Author: Marc-André Laverdière 
Date:   Fri Mar 8 19:22:58 2013 -0500

Documentation to avoid a real use-after-free bug

Change-Id: Ie8a4432b0a70703fbfe92480ad0608b659a887d0
Reviewed-on: https://gerrit.libreoffice.org/2608
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 307d861..55beae9 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1268,6 +1268,9 @@ void SvListView::ModelIsRemoving( SvTreeListEntry* )
 
 void SvListView::ModelHasRemoved( SvTreeListEntry* )
 {
+//WARNING WARNING WARNING
+//The supplied pointer should have been deleted
+//before this call. Be careful not to use it!!!
 DBG_CHKTHIS(SvListView,0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: New laptop

2013-03-10 Thread Marc-André Laverdière
Hello,


I recently had some problems of a laptop crashing randomly. I put a
widget on my desktop that shows the CPU temperature and it allowed me
to diagnose the problem. My system was at 75 degrees without doing
anything heavy.

The BIOS update did wonders. I would suggest to do that right away if
there is one released.

I also purposefully slow down the build, by running with nice -n19,
the lowest priority. You can also set some settings in autogen.sh to
limit the number of concurrent processes, but I found the solution to
work well. Also, you can get a fan to put under your laptop for a few
euros/dollars to help it cool down (My personal experience with those
wasn't very satisfactory, but your mileage may vary).

Much cheaper than buying a computer :)


Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Fri, Mar 8, 2013 at 5:29 AM, Michael Meeks  wrote:
> Hi José,
>
> On Fri, 2013-03-08 at 00:02 +0100, Christian Lohmaier wrote:
>> On Thu, Mar 7, 2013 at 11:16 PM, José Guilherme Vanz wrote:
>> > Well, I would like to ask a tip for you. I have a dell vostro laptop,
>>> but I cannot use it for contribute in the LO project. The laptop
>>> turns off because of the temperature.
>>
>> This should never happen with the current type of processors (they
>> reduce frequency/switch to a low-performance mode triggered by
>> temperature) - so it is a clear indicator that your fan/heatsink needs
>> a little bit of love (cleaning).
>
> All of Christian's advice is excellent - hoovering can help; you might
> want to check if there is a BIOS update - they often have bugs in this
> area, or a setting to tweak the fan speed in there. I guess you're
> running Linux - and it's possible that it's not driving the hardware
> quite as the manufacturer intended (ie. for it to run Windows ;-).
>
> The LibreOffice code-base has quite a long history of killing hardware
> - particularly laptop hardware - and the gnumake / parallelism belting
> the CPU even more intensely and gcc's memory access patterns prolly make
> for some nice pathological test-case ;-)
>
> Previously sleeps were inserted to add some cooling-off period; 
> failing
> that you could install icecream and tweak it to only run on one CPU (or
> say three if you have four) - which might give some thermal head-room.
>
> HTH,
>
> Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: svtools/source

2013-03-09 Thread Marc-André Laverdière
 svtools/source/control/inettbc.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a16c17b4723bfd6ff69dd154342fa440fc280d50
Author: Marc-André Laverdière 
Date:   Fri Mar 8 19:58:50 2013 -0500

coverity#989728: uninitialized scalar

Change-Id: Ic8e248eff6db54f407ec894cab28a27957c6fd0f
Reviewed-on: https://gerrit.libreoffice.org/2609
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/svtools/source/control/inettbc.cxx 
b/svtools/source/control/inettbc.cxx
index 2687994..374fa7d 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -139,6 +139,7 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
 , bOnlyDirectories( pBoxP->bOnlyDirectories )
 , bNoSelection( pBoxP->bNoSelection )
 , stopped_(false)
+, commandId_(0)
 {
 aLink.CreateMutex();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: unoidl/source

2013-03-09 Thread Marc-André Laverdière
 unoidl/source/reg2unoidl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c93643db82d9af2f9369b5daf6298f6b86510f14
Author: Marc-André Laverdière 
Date:   Fri Mar 8 19:37:59 2013 -0500

coverity#989730 and coverity#989729: Uninitialized scalar field

Change-Id: Iaecfa720b898746d457de731734b332226d3e9c2
Reviewed-on: https://gerrit.libreoffice.org/2607
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/unoidl/source/reg2unoidl.cxx b/unoidl/source/reg2unoidl.cxx
index 730d42e..0f0b53e 100644
--- a/unoidl/source/reg2unoidl.cxx
+++ b/unoidl/source/reg2unoidl.cxx
@@ -248,7 +248,7 @@ void writeKind(
 
 struct Item {
 explicit Item(rtl::Reference< unoidl::Entity > const & theEntity):
-entity(theEntity)
+entity(theEntity),nameOffset(0),dataOffset(0)
 {}
 
 rtl::Reference< unoidl::Entity > entity;
@@ -258,7 +258,7 @@ struct Item {
 
 struct ConstItem {
 explicit ConstItem(unoidl::ConstantValue const & theConstant):
-constant(theConstant)
+constant(theConstant),nameOffset(0),dataOffset(0)
 {}
 
 unoidl::ConstantValue constant;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang

2013-02-11 Thread Marc-André Laverdière
 compilerplugins/clang/plugin.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 847749e975a7111ea306909a29fddb5df13e9a70
Author: Marc-André Laverdière 
Date:   Fri Feb 8 09:54:16 2013 -0500

Fixed compilation error of Clang plugins on Ubuntu/Mint

Change-Id: Ib08c5075034e0e16c5541f05425ef15d2cc3a6f6
Reviewed-on: https://gerrit.libreoffice.org/2045
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx
index 92ff6f3..d30c37a 100644
--- a/compilerplugins/clang/plugin.hxx
+++ b/compilerplugins/clang/plugin.hxx
@@ -15,6 +15,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 2
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PATCH] Replace loop by memset in sal/typesconfig/typesconfig.c

2013-01-13 Thread Marc-André Laverdière
Quick question: is this code security-sensitive at all?

I know that there has been some security issues related to one compiler
(Microsoft's) that was optimizing away the memset in some cases. So the
suggested workaround was a loop. Reference: Writing Secure Code.

The other question is: Are we still supporting building with such a
compiler? My bad memory tells me that VS 2008 and later should not have
this behavior anymore, but it is worthwhile to double-check.

On Tuesday, January 8, 2013, Stephan Bergmann wrote:

> On 12/24/2012 06:44 PM, Julien Nabet wrote:
>
>> On 24/12/2012 18:29, Norbert Thiebaud wrote:
>>
>>> On Mon, Dec 24, 2012 at 8:45 AM, julien2412  wrote:
>>>
>>>> By taking a look at the file  sal/typesconfig/typesconfig.c,
>>>> GetAlignment
>>>> function, I wonder if we could replace the for loop by a memset to
>>>> optimize
>>>> a bit.
>>>> So here's a straightforward patch:
>>>> diff --git a/sal/typesconfig/typesconfig.**c
>>>> b/sal/typesconfig/typesconfig.**c
>>>> index 473f07a..ef52c5f 100644
>>>> --- a/sal/typesconfig/typesconfig.**c
>>>> +++ b/sal/typesconfig/typesconfig.**c
>>>> @@ -262,11 +262,9 @@ int GetAlignment( Type eT )
>>>>   {
>>>> char  a[ 16*8 ];
>>>> long  p = (long)(void*)a;
>>>> -  int   i;
>>>>
>>>> /* clear a[...] to set legal value for double access */
>>>> -  for ( i = 0; i<  16*8; i++ )
>>>> -a[i] = 0;
>>>> +  memset(a, 0, sizeof(a));
>>>>
>>>> p = ( p + 0xF )&  ~0xF;
>>>> for ( i = 1; i<  16; i++ )
>>>>
>>>> Would it be ok?
>>>>
>>> well you can't remove
>>>   int i;
>>>
>>> since it is still used in the second for loop.
>>>
>>> and I doubt that that code is run very often... namely 4 times per
>>> execution of the typesconfig executable... which in turn run dozens of
>>> fprintf...
>>> I'd say that this micro-optimization would be completely
>>> un-measurable, and may or may not be an optimization at all depending
>>> on how the memset is treated.
>>> but sure, it is 'ok', as in it won't hurt anything.
>>>
>>
> The benefit of memset over an explicit loop here would be shorter, more
> obvious (IMO) code, so I'd suggest you do the change after all.
>
> Stephan
>
>  ok let's forget it, I suppose that the one who made this loop has
>> certainly good reasons for this + you must be right, micro-optimization
>>
> __**_
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/**mailman/listinfo/libreoffice<http://lists.freedesktop.org/mailman/listinfo/libreoffice>
>


-- 
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Error building with clang

2013-01-04 Thread Marc-André Laverdière
Miklos was right - the newer version changes everything. I just
finished building, and the only option I used was to enable the
plugins.

I'll put together a small blog entry about this, in case others want
to try the same. Should I update the wiki too?
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Fri, Jan 4, 2013 at 3:37 PM, Lubos Lunak  wrote:
> On Friday 04 of January 2013, Marc-André Laverdière wrote:
>> Hi,
>>
>> I am building with clang. I ran make clean and even wiped my ccache cache.
>>
>> I run into this problem:
>> /home/marc-andre/lo/core/solver/unxlngx6.pro/inc/external/boost/uuid/seed_r
>>ng.hpp:143:61: note: override this message by inserting an explicit cast
>> unsigned int rn[] = { std::rand(), std::rand(), std::rand() };
>
>  Read again what the message says. This message is a hint how to fix the
> problem, the error message precedes it.
>
>> Note that when I build with --with-system-boost, I do not get this
>> error. The system version is 1.49.0.1
>>
>> I am guessing that we are using a somewhat older version of boost.
>> So: a) can anyone duplicate this? b) which version of boost should we
>> upgrade to?
>
>  Use whichever one works for you. I'll have a look at the internal copy.
>
> --
>  Lubos Lunak
>  l.lu...@suse.cz
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Addin exceptions in SvStream

2013-01-04 Thread Marc-André Laverdière
Aaah, that is what was missing. I would've expected that to be
installed with the clang development packages as a dependency. Thanks!
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Fri, Jan 4, 2013 at 1:54 PM, Miklos Vajna  wrote:
> On Fri, Jan 04, 2013 at 01:45:11PM +0530, Marc-André Laverdière 
>  wrote:
>> /usr/include/clang/Basic/LLVM.h:20:10: fatal error:
>> 'llvm/Support/Casting.h' file not found
>
> Do you have llvm-devel (or equivalent) installed?
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Error building with clang

2013-01-04 Thread Marc-André Laverdière
Hi,

I am building with clang. I ran make clean and even wiped my ccache cache.

I run into this problem:
/home/marc-andre/lo/core/solver/unxlngx6.pro/inc/external/boost/uuid/seed_rng.hpp:143:61:
note: override this message by inserting an explicit cast
unsigned int rn[] = { std::rand(), std::rand(), std::rand() };

My system: Linux Mint 14 64 bit.

Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

ccache version 3.1.7

Note that when I build with --with-system-boost, I do not get this
error. The system version is 1.49.0.1

I am guessing that we are using a somewhat older version of boost.
So: a) can anyone duplicate this? b) which version of boost should we
upgrade to?

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Addin exceptions in SvStream

2012-12-30 Thread Marc-André Laverdière
@Michael. I am studying in a software reegineering lab - I do have a
small clue ;) We had a Masters' student who implemented his own C
grammar. 3 months of work for one bullet in one slide. No fun.

I know that C++ is an horrible monster to parse. My question was why
pick a tool over another.
Maybe the JavaCC or Antlr grammars are not very good. Maybe the
Phoenix framework doesn't work for some variants of C++ we care about.
Maybe GCC has an horrible API. Maybe nobody feels like asking for a
license for the Bauhaus framework.
You can tell I've done a lot of guessing in the last paragraph :D
Since I am in such a lab, and someone will sooner or later want an
improved C/C++ analysis tool, I'd like to give the best suggestion.

@Lubos. I started writing a plug-in. I have a problem with compiling,
however. It somehow doesn't find the headers on my system.
This is the autogen.sh I use (I tried with and without --includedir,
and --includedir=/usr/)
./autogen.sh CC=clang CXX=clang++ --includedir=/usr/include/
--enable-compiler-plugins

I get this in the output:
checking clang/AST/RecursiveASTVisitor.h usability... no
checking clang/AST/RecursiveASTVisitor.h presence... no
checking for clang/AST/RecursiveASTVisitor.h... no
configure: error: Cannot find Clang headers to build compiler plugins.

Yet...
$ ls /usr/include/clang/AST/RecursiveASTVisitor.h
/usr/include/clang/AST/RecursiveASTVisitor.h

I am on Linux Mint 14. Any clue what is going on?
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Sat, Dec 22, 2012 at 10:43 PM, Michael Stahl  wrote:
> On 22/12/12 12:53, Marc-André Laverdière wrote:
>> Tell me, why Clang then? Is it because the JavaCC or Antlr grammars
>> weren't good enough?
>
> uhm... have you ever tried to write a C++ parser?  reinventing that
> wheel takes man-years (or perhaps man-decades) of effort to get right...
>  this and the fact that for the longest time C++ frontends were tightly
> coupled to compiler internals is the main reason why there are ~no
> working C++ refactoring tools today, and hopefully LLVM and/or GCC's
> plugin interfaces will fix that some time.
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Addin exceptions in SvStream

2012-12-22 Thread Marc-André Laverdière
Looking at it, it reminds me of JavaCC visitors - I was expecting
something a tad bit more complex.

Since we don't have flow analysis at that level, we may have some
erroneous results, but I'm guessing we'll have accuracy in the 90%
range.

Tell me, why Clang then? Is it because the JavaCC or Antlr grammars
weren't good enough?
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Mon, Dec 17, 2012 at 7:37 PM, Lubos Lunak  wrote:
> On Saturday 15 of December 2012, Marc-André Laverdière wrote:
>> Sounds to me like a big learning curve is involved - which is going to
>> be very distracting from research activities.
>
>  Depends. It is something new to learn, but the API is rather intuitive.
>
>> If someone can give me link to a good tutorial that gives me a good
>> feeling about it I may bite.
>
>  I don't think there's anything like that (yet, at least). The Clang tutorials
> I could find only say how to create a very basic plugin, which is something
> I've already sorted out for LO, so now it is about writing actual code using
> Clang internal API (http://clang.llvm.org/doxygen/).
>
>  That said, at this point it should be enough just to give it a try. Under
> compilerplugins/clang there are already several plugins, with 2 of them
> (lclstaticfix.cxx and postfixincrementfix.cxx) doing code rewriting. Writing
> a new one would mean something like looking at what's there, compile a
> relevant piece of code with '-Xclang -ast-dump' options to get AST dump to
> see how Clang represents it internally, and write a new plugin using the
> relevant classes mentioned in the AST dump (and I find it much simpler to
> check them out in CLANGDIR/include/clang/AST/ rather than the doxygen
> documentation).
>
>  It's not exactly trivial, but it's probably simpler to get than a lot of LO
> code. If you decide to give it a try, feel free to ask if you run into
> trouble.
>
> --
>  Lubos Lunak
>  l.lu...@suse.cz
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Addin exceptions in SvStream

2012-12-14 Thread Marc-André Laverdière
Sounds to me like a big learning curve is involved - which is going to
be very distracting from research activities.
If someone can give me link to a good tutorial that gives me a good
feeling about it I may bite.

(But I can still change code in the filters manually - the thing is
that mindless work is no fun)
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Fri, Dec 14, 2012 at 5:28 AM, Michael Meeks  wrote:
>
> On Thu, 2012-12-13 at 14:00 +0100, Lubos Lunak wrote:
>>  I think it shouldn't be that difficult to write a Clang plugin that finds 
>> all
>> uses of SvStream::operator<> , checks whether the variable read to is
>> initalized [*] , and possibly it shouldn't be even that big deal to have it
>> rewrite them to a series of SvStream::readInt32() etc. calls (i.e. EasyHack
>> fdo#56110). I have not written yet any howto on plugins besides the examples
>> under compilerplugins/, but if there would be interest, I could do something.
>
> Oooh ! that would be really lovely :-)
>
>> [*] Or, since I assume all those variables have been needlessly initialized
>> just in attempt to silence the broken warning with the wretched gcc thing on
>> Apple, the check will need to be more complicated and find if the initializer
>> is not the default value for the type.
>
> Yep - I guess so !
>
> Would rather improve the robustness of our filters I suspect.
>
> Marc - now that's a real fun / hacking task - are you interested ? :-)
>
> ATB,
>
> Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Addin exceptions in SvStream

2012-12-13 Thread Marc-André Laverdière
That's the problem... what we don't know can be hurting us big time.
And since the tests are not very thorough, I can't have a good
confidence that things are not broken.

So, either we finish this patch and hope people will pick up those
cases along the way - a risky proposal but it has the advantage of
immunizing pretty much every filter for 'cheap'.

Otherwise, I suggest that we go for a SvStream wrapper that throws
exceptions - no changes to SvStream. It can be used wherever wanted,
so that's a lot of engineering effort to bolt that in place - but less
work than just putting stream->good() checks everywhere.
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Thu, Dec 13, 2012 at 4:40 AM, Michael Meeks  wrote:
> Hi Marc,
>
> On Thu, 2012-12-13 at 02:09 -0500, Marc-André Laverdière wrote:
>> I feel that this behavior of SvStream not to change the parameter in
>> case of a broken stream should be changed. I am not sure why that is
>> there.
>
> Well - it is -thought- (but hard to prove) that this behaviour is
> relied on by the code in a number of places:
>
> sal_uInt16 nFallbackStyleFoo = 0x;
> nStream >> nFallbackStyleFoo;
>
> And that nil'ing it - though attractive -might- then break things.
> Clever ideas to find and fix those few cases appreciated - but in
> general combining that with re-working to use explicit read functions
> seems like a good (albeit time-consuming) idea.
>
> Of course, it'd be possible to imagine a boolean on the stream to
> return defined data in these cases - but that's a bit sick IMHO ;-) if
> we have to audit the code and test it, why not clean it to use (much
> safer) readInt16(); style methods :-)
>
> HTH,
>
> Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Addin exceptions in SvStream

2012-12-12 Thread Marc-André Laverdière
My reply was accidentally sent to Michael Stahl only. Ooops.

I feel that this behavior of SvStream not to change the parameter in
case of a broken stream should be changed. I am not sure why that is
there.

I have a partial change to that that I am attaching for review. I am
not getting the logic on the chars so things aren't fixed.

The rest, I ran it over a make check and nothing broke - that doesn't
necessarily mean that the fix is harmless...
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com



On Tue, Dec 11, 2012 at 10:05 AM, Michael Stahl  wrote:
> On 11/12/12 15:57, Stephan Bergmann wrote:
>> Exceptions are certainly no silver bullet (semantically they are
>> ~equivalent to encoding exception information in function return values
>> and explicitly handling those return values accordingly, so the "endemic
>> bloat" claim meets skepticism)
>
> well in practice in our code the alternative to exceptions is not
> "explicitly handling those return values" but simply ignoring the error
> conditions which usually tends to results in smaller code  ;-)
>
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice


0001-Defaulting-to-0-on-bad-stream-read-WIP.patch
Description: Binary data


0002-Broken-fix-for-SvStream-operator-on-chars.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Addin exceptions in SvStream

2012-12-10 Thread Marc-André Laverdière
Hello everyone,

I am doing some proactive hardening of the image filters these days,
and I have to say that there is a lot of code like this:

*stream >> meh;
if (! stream->good())
  return sal_False;

It is very cluttered to do this for _every_ read.

A simpler way would be to have opt-in exception handling. Here is how
that would work.

By default, all SvStreams _do not_ throw exceptions.

However, we could have a call like
stream->setThrowExceptions(sal_True) to enable them and then
stream->setThrowExceptions(sal_True) to disable them once the bit of
code that is aware of exceptions is done.
That means that we need a call stream->getThrowExceptions() to handle this.

The only risk I can see is if svstreams are accessed in a
multithreaded manner. I don't know of any case like that.

Another way to implement this would be with a wrapper class such as
ExceptionSvStream that would have the same interface, so that it can
be dropped in wherever needed.

What do you think of these proposals? What could go wrong if we were
to implement it?

Regards,

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Broken dmake

2012-10-07 Thread Marc-André Laverdière
Hello,

I recently reinstalled a different Linux distro on my system.
Using the same repo that I had before, I made a make clean,
autogen.sh, and then trying to run make I get these errors:
dmake: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found
(required by dmake)

So, first question: is this a LO-hacked dmake that is broken that I
need to rebuild? If so, how do I do it?

Regards,

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Fixed out of bounds memory access

2012-06-15 Thread Marc-André Laverdière
Here is a patch for a small fish I caught while valgrinding. It was
accessing memory in the strdup.


Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com


0001-Fixed-invalid-memory-access.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


License Statement

2012-04-27 Thread Marc-André Laverdière
Hello,

Just to make sure it is out there...

all of my past and future contributions are licensed under the
MPL/LGPLv3+ dual license until further notice.

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: ancient openssl bundled

2012-04-19 Thread Marc-André Laverdière
As a sidenote, the need for openssl is not direct for LO, but something
needed for dependencies. I wanted to remove openssl altogether and rely on
nss instead, and you could almost hear the grunts of pain on irc. My
feeling is that this dep is too obscure, so nobody wants to touch it...
On 2012-03-27 1:57 PM, "Norbert Thiebaud"  wrote:

> On Tue, Mar 27, 2012 at 12:33 PM, Enrico Weigelt 
> wrote:
> >
> > I'll maintain my downstream fork dropping the 3rdparty packages step
> > by step. (I'll contigiously rebase, to I'll be ontop of master).
> >
> Again. most packager for unix based distro can do just that with the
> proper configure argument of LibreOffice out of the box.
> And MacOSX does that to for the few library that _are_ in the standard
> system...
>
> we maintain a copy of the external libraries for the platforms that
> don't have them.. but you _can_ use the system version for most of
> them if your system have them.
>
> Norbert
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Disabling Temporary Files?

2012-04-05 Thread Marc-André Laverdière
bump :)

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2012/3/28 Marc-André Laverdière :
> My colleagues found out that the temp file is password-protected too,
> so that part is fine.
> But images inside the file are saved as temporary files too! Is there
> something we can do about that?
>
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and complete,
> not lacking anything." -James 1:4
> http://asimplediscipleslife.blogspot.com/
> mlaverd.theunixplace.com
>
>
>
>
> 2012/3/2 Michael Meeks :
>>
>> On Fri, 2012-03-02 at 14:31 -0500, Marc-André Laverdière wrote:
>>> I will do that investigation. Just a quick question: if the original
>>> file was password-protected, will the temp files be similarly be
>>> protected?
>>
>>        Almost certainly not :-) but theoretically they could be of course.
>>
>>        All the best,
>>
>>                Michael.
>>
>> --
>> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Disabling Temporary Files?

2012-03-28 Thread Marc-André Laverdière
My colleagues found out that the temp file is password-protected too,
so that part is fine.
But images inside the file are saved as temporary files too! Is there
something we can do about that?

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2012/3/2 Michael Meeks :
>
> On Fri, 2012-03-02 at 14:31 -0500, Marc-André Laverdière wrote:
>> I will do that investigation. Just a quick question: if the original
>> file was password-protected, will the temp files be similarly be
>> protected?
>
>        Almost certainly not :-) but theoretically they could be of course.
>
>        All the best,
>
>                Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Disabling Temporary Files?

2012-03-02 Thread Marc-André Laverdière
Hello,
I will do that investigation. Just a quick question: if the original file
was password-protected, will the temp files be similarly be protected?
On 2012-02-28 1:57 PM, "Michael Stahl"  wrote:

> On 28/02/12 19:46, Marc-André Laverdière wrote:
> > Hello,
> >
> > I need to ensure that data confidentiality.
>
> i don't believe that the completely undisciplined use of temp files in
> the historic OpenOffice.org code base is conductive to this goal; it
> would probably be a good idea to investigate encrypted file systems, at
> least for /home and /tmp or whatever the equivalent is on Windows (also,
> you want to ensure that swap/pagefile is on encrypted storage).
>
> regards,
>  michael
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Disabling Temporary Files?

2012-02-28 Thread Marc-André Laverdière
Hello,

I need to ensure that data confidentiality.

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2012/2/27 Michael Meeks :
> Hi Marc,
>
> On Mon, 2012-02-27 at 04:15 -0500, Marc-André Laverdière wrote:
>> I am working on something for which we want the document to stay in
>> memory, with no temp file on disk.
>
>        Ho hum ;-)
>
>> And the result is that we have a temporary file in
>> C:\Users\meh\AppData|local\Temp\
>
>        Sounds normal, -hopefully- the properties on that file are such that
> only the user can read/write them - otherwise we have a bigger problem.
>
>> Is there any PropertyValue that we can set that will disable all
>> temporary files?
>
>        It seems unlikely - we rely on tmp files quite heavily in a number of
> situations I think. Of course - we could try collecting those all
> together behind one API in sal/ and then using an in-memory storage
> instead I guess but ...
>
>        Why do you want to keep them off the oxide ?
>
>        Sorry,
>
>                Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Disabling Temporary Files?

2012-02-27 Thread Marc-André Laverdière
Hello everybody,

I am working on something for which we want the document to stay in
memory, with no temp file on disk.

So far, we open the file as such:

com.sun.star.beans.PropertyValue[] args = new
com.sun.star.beans.PropertyValue[] {
   new PropertyValue("ReadOnly", -1, true, PropertyState.DIRECT_VALUE),
   new PropertyValue("Hidden", -1,true,PropertyState.DIRECT_VALUE),
   new PropertyValue("Overwrite",-1,true,PropertyState.DIRECT_VALUE),
   new PropertyValue("InputStream", 0,new
ByteArrayToXInputStreamAdapter(myData), PropertyState.DIRECT_VALUE),
};
xComponent = xLoader.loadComponentFromURL("private:stream","_self", 0,args);

And the result is that we have a temporary file in
C:\Users\meh\AppData|local\Temp\

Is there any PropertyValue that we can set that will disable all
temporary files?
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Dead code removal

2012-01-15 Thread Marc-André Laverdière
Hello list,

Since I went a bit beyond unusedcode.easy, I prefer to ask review on this one :)

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
From 4732c77171a1aa288761b8280d10491f60fa233d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Laverdi=C3=A8re-Papineau?=
 
Date: Sun, 15 Jan 2012 18:24:58 -0500
Subject: [PATCH] removed some dead code

---
 filter/source/svg/svgexport.cxx  |   50 +-
 filter/source/svg/svgfilter.hxx  |6 ---
 filter/source/svg/svgwriter.cxx  |8 -
 tools/inc/tools/color.hxx|1 -
 tools/inc/tools/datetime.hxx |1 -
 tools/source/datetime/datetime.cxx   |   17 --
 tools/source/generic/color.cxx   |   15 -
 unusedcode.easy  |8 -
 writerperfect/source/filter/PageSpan.cxx |   16 -
 writerperfect/source/filter/PageSpan.hxx |2 -
 10 files changed, 1 insertions(+), 123 deletions(-)

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 6149ddf..ea63fa1 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -382,20 +382,6 @@ sal_Bool SVGExport::IsUseNativeTextDecoration() const
 
 // -
 
-::rtl::OUString SVGExport::GetGlyphPlacement() const
-{
-::rtl::OUString aRet;
-
-if( mrFilterData.getLength() > 3 )
-mrFilterData[ 3 ].Value >>= aRet;
-else
-aRet = B2UCONST( "abs" );
-
-return aRet;
-}
-
-// -
-
 sal_Bool SVGExport::IsUseOpacity() const
 {
 sal_Bool bRet = !IsUseTinyProfile();
@@ -408,43 +394,9 @@ sal_Bool SVGExport::IsUseOpacity() const
 
 // -
 
-sal_Bool SVGExport::IsUseGradient() const
-{
-sal_Bool bRet = !IsUseTinyProfile();
-
-if( !bRet && ( mrFilterData.getLength() > 5 ) )
-mrFilterData[ 5 ].Value >>= bRet;
-
-return bRet;
-}
-
-// -
-
-void SVGExport::pushClip( const ::basegfx::B2DPolyPolygon& rPolyPoly )
-{
-maClipList.push_front( ::basegfx::tools::correctOrientations( rPolyPoly ) );
-}
-
-// -
-
-void SVGExport::popClip()
-{
-if( !maClipList.empty() )
-maClipList.pop_front();
-}
-
-// -
-
-sal_Bool SVGExport::hasClip() const
-{
-return( !maClipList.empty() );
-}
-
-// -
-
 const ::basegfx::B2DPolyPolygon* SVGExport::getCurClip() const
 {
-return( maClipList.empty() ? NULL : &( *maClipList.begin() ) );
+return NULL;
 }
 
 // 
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 21c1238..d218e06 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -141,13 +141,8 @@ public:
 sal_Bool IsUseTinyProfile() const;
 sal_Bool IsEmbedFonts() const;
 sal_Bool IsUseNativeTextDecoration() const;
-::rtl::OUString GetGlyphPlacement() const;
 sal_Bool IsUseOpacity() const;
-sal_Bool IsUseGradient() const;
 
-void  pushClip( const ::basegfx::B2DPolyPolygon& rPolyPoly );
-void  popClip();
-sal_Bool  hasClip() const;
 const ::basegfx::B2DPolyPolygon* getCurClip() const;
 
 protected:
@@ -161,7 +156,6 @@ protected:
 private:
 
 const Sequence< PropertyValue >&mrFilterData;
-B2DPolyPolygonList  maClipList;
 
 SVGExport();
 };
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 9f70046..0639e5d 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -640,14 +640,6 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo
 else
 aPolyPoly = rPolyPoly;
 
-if( mrExport.hasClip() )
-{
-const ::basegfx::B2DPolyPolygon aB2DPolyPoly( ::basegfx::tools::correctOrientations( aPolyPoly.getB2DPolyPolygon() ) );
-
-aPolyPoly = PolyPolygon( ::basegfx::tools::clipPolyPolygonOnPolyPolygon(
-*mrExport.getCurClip(), aB2DPolyPoly, sal_False, sal_False ) );
-}
-
 // add path data attribute
 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, GetPathString( aPolyPoly, bLineOnly ) );
 
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index ba9d7df..a9fe589 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hx

Re: [Libreoffice] Problem Building - NSS Depedency

2012-01-01 Thread Marc-André Laverdière
Good news I guess... I am changing my dev machine to a F16 box that doesn't
have this error compiling... so you don't have to spend time trying to
figure out the problem :)

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2011/12/30 Marc-André Laverdière 

> Hi Kendy,
>
> Since I was offline, I tried a few things. I essentially did a git reset
> --hard, a make clean, and a rm -rf unx*.
>
> Once that was done, I deleted my ccache folder.
>
> I am bulding with --enable-symbols --with-num-cpus=4 on a Ubuntu 11.10
> box. I also updated gnu make with what is in developer tools to 3.82. My
> GCC version is 4.6.1 and ccache is at 3.1.5.
>
> Here is the impossibly long transcript. Thanks for having a look.
>
>
>
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and complete,
> not lacking anything." -James 1:4
> http://asimplediscipleslife.blogspot.com/
> mlaverd.theunixplace.com
>
>
>
>
> 2011/12/27 Jan Holesovsky 
>
>> Hi Marc-Andre,
>>
>> Marc-André Laverdière píše v So 24. 12. 2011 v 15:23 -0500:
>>
>> > By the way, when building with the nss system lib instead, I get this:
>> > http://libreoffice.pastebin.ca/2096180
>>
>> Can you please pastebin the full logs?  You posted just the error, not
>> the linker command line or at least in what module does it happen - hard
>> to try to reproduce the error without that :-(
>>
>> Regards,
>> Kendy
>>
>>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Problem Building - NSS Depedency

2011-12-24 Thread Marc-André Laverdière
By the way, when building with the nss system lib instead, I get this:
http://libreoffice.pastebin.ca/2096180

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2011/12/23 Marc-André Laverdière 

> I have  been plagued with this problem for a while now. Whether I use
> system nss libs or not, the result is the same.
>
> I copy-pasted the results here: http://libreoffice.pastebin.ca/2096084
>
> I feel like there is a linker option missing, but I can't make sense of
> the makefiles to figure out where to put it.
>
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and complete,
> not lacking anything." -James 1:4
> http://asimplediscipleslife.blogspot.com/
> mlaverd.theunixplace.com
>
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Problem Building - NSS Depedency

2011-12-23 Thread Marc-André Laverdière
I have  been plagued with this problem for a while now. Whether I use
system nss libs or not, the result is the same.

I copy-pasted the results here: http://libreoffice.pastebin.ca/2096084

I feel like there is a linker option missing, but I can't make sense of the
makefiles to figure out where to put it.

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] message construction bloat ...

2011-11-24 Thread Marc-André Laverdière
Can we get the c++ equivalent of logback/slf4j? Avoiding string concat most
of the time is the better option.

Marc-André Laverdière
Sent from a mobile device, please  excuse the brevity

On 23 Nov 2011 11:56, "Lubos Lunak"  wrote:

On Wednesday 23 of November 2011, Michael Meeks wrote:

> On Wed, 2011-11-23 at 14:56 +0100, Lubos Lunak wrote:

> > And some of the arguments are rather weak as well, I can get you easy to
> > use and read, bett...
 I haven't thought it out in detail, but the general idea is attached. It's
just a proof of concept, so there are some obvious problems, but I don't see
a flaw in the design. Since it's also just a single call, the in-place cost
is small and is moved to the bodies of the templates, which can be just in
one place, one per each combination of arguments (and the common instances
of
the template can be externed, so it really will be just one copy). The
template code is relatively small, so I don't expect noticeable impact on
compile time. Also, funnily enough, the generated code in the place of the
call is one instruction shorter, because unlike printf() it does not need
the
terminating NULL for the vararg :).

 I expect it would be even possible to achieve such single in-place call
even
for the LOG( "P is " << p << " and b is " << b ) case, or even do this for
string+string operation, which would turn it into the even better-looking
LOG( "P is " + p + " and b is " b ) or LOG( "P is %1 and b is %2", p, b ),
whichever would suit one's fancy (as in, both would be possible at the same
time). It would require getting a bit more creative with argument and return
types for the operator overloads, but that'd be hidden behind the scenes.

--
 Lubos Lunak
 l.lu...@suse.cz

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Setting up a non-intrusive build cluster

2011-11-24 Thread Marc-André Laverdière
not ubuntu. i logged on two accounts and only one shows...

Marc-André Laverdière
Sent from a mobile device, please  excuse the brevity

On 24 Nov 2011 07:10, "Lionel Elie Mamane"  wrote:

On Wed, Nov 23, 2011 at 06:28:41PM -0500, Marc-André Laverdière wrote:
> I played with the utmp stuf...
My "who" shows *only* interactive sessions... Be they graphical, on
the console or through ssh.

--
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Setting up a non-intrusive build cluster

2011-11-23 Thread Marc-André Laverdière
Quick question...

Is GDM the default/standard graphical login in linux distros? If so, I
think that this could be good:
http://library.gnome.org/admin/gdm/stable/configuration.html.en

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2011/11/23 Marc-André Laverdière 

> I played with the utmp stuff, and it records the shells only, not the
> interactive sessions...
>
> Any method other than the ps trick? (which may break of process names
> changes...)
>
>
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and complete,
> not lacking anything." -James 1:4
> http://asimplediscipleslife.blogspot.com/
> mlaverd.theunixplace.com
>
>
>
>
> 2011/11/23 Marc-André Laverdière 
>
>> Working on that... it looks simple, but the code isn't giving me what I
>> expected...
>> /me grumbles looking at unknown APIs...
>>
>>
>> Marc-André LAVERDIÈRE
>> "Perseverance must finish its work so that you may be mature and
>> complete,
>> not lacking anything." -James 1:4
>> http://asimplediscipleslife.blogspot.com/
>> mlaverd.theunixplace.com
>>
>>
>>
>>
>> On Mon, Nov 21, 2011 at 7:15 AM, Lionel Elie Mamane wrote:
>>
>>> On Mon, Nov 21, 2011 at 11:50:52AM +, Michael Meeks wrote:
>>> > On Sat, 2011-11-19 at 16:15 -0500, Marc-André Laverdière wrote:
>>>
>>> >> I am convincing some powers-that-be that having a build farm would
>>> >> be good, and they are starting to listen. This would really help me
>>> >> write patches for LO, as my poor computer is having impossibly long
>>> >> compile cycles.
>>>
>>> >> There is a bunch of somewhat old Linux workstations that could
>>> >> contribute to it. The concern is mostly that it should be so that the
>>> >> systems should not accept jobs when users are logged in, as it may
>>> >> interfere with whatever work it is that they are doing.
>>>
>>> Maybe more interesting than "nobody logged on" would be "system load
>>> very low", e.g. "load <= 0.1*(number of cores)", possibly combined
>>> with "free memory + memory used for cache >= threshold".
>>>
>>> >   I'm sure they'd accept a patch to add a config option to use some
>>> > system heuristic before accepting a job. Of course, reliably detecting
>>> a
>>> > login session is prolly quite fun in itself ;-) ps ax | grep
>>> > gnome-session | kdeinit or something ?
>>>
>>> Nah:
>>>
>>>   #include 
>>>
>>>   struct utmpx *getutxent(void);
>>>   struct utmpx *getutxid(const struct utmpx *);
>>>   struct utmpx *getutxline(const struct utmpx *);
>>>   struct utmpx *pututxline(const struct utmpx *);
>>>   void setutxent(void);
>>>   void endutxent(void);
>>>
>>> is the POSIX/SUS interface to do that. Or just run "/usr/bin/who -q"
>>> :)
>>>
>>> --
>>> Lionel
>>>
>>
>>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Setting up a non-intrusive build cluster

2011-11-23 Thread Marc-André Laverdière
I played with the utmp stuff, and it records the shells only, not the
interactive sessions...

Any method other than the ps trick? (which may break of process names
changes...)

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2011/11/23 Marc-André Laverdière 

> Working on that... it looks simple, but the code isn't giving me what I
> expected...
> /me grumbles looking at unknown APIs...
>
>
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and complete,
> not lacking anything." -James 1:4
> http://asimplediscipleslife.blogspot.com/
> mlaverd.theunixplace.com
>
>
>
>
> On Mon, Nov 21, 2011 at 7:15 AM, Lionel Elie Mamane wrote:
>
>> On Mon, Nov 21, 2011 at 11:50:52AM +, Michael Meeks wrote:
>> > On Sat, 2011-11-19 at 16:15 -0500, Marc-André Laverdière wrote:
>>
>> >> I am convincing some powers-that-be that having a build farm would
>> >> be good, and they are starting to listen. This would really help me
>> >> write patches for LO, as my poor computer is having impossibly long
>> >> compile cycles.
>>
>> >> There is a bunch of somewhat old Linux workstations that could
>> >> contribute to it. The concern is mostly that it should be so that the
>> >> systems should not accept jobs when users are logged in, as it may
>> >> interfere with whatever work it is that they are doing.
>>
>> Maybe more interesting than "nobody logged on" would be "system load
>> very low", e.g. "load <= 0.1*(number of cores)", possibly combined
>> with "free memory + memory used for cache >= threshold".
>>
>> >   I'm sure they'd accept a patch to add a config option to use some
>> > system heuristic before accepting a job. Of course, reliably detecting a
>> > login session is prolly quite fun in itself ;-) ps ax | grep
>> > gnome-session | kdeinit or something ?
>>
>> Nah:
>>
>>   #include 
>>
>>   struct utmpx *getutxent(void);
>>   struct utmpx *getutxid(const struct utmpx *);
>>   struct utmpx *getutxline(const struct utmpx *);
>>   struct utmpx *pututxline(const struct utmpx *);
>>   void setutxent(void);
>>   void endutxent(void);
>>
>> is the POSIX/SUS interface to do that. Or just run "/usr/bin/who -q"
>> :)
>>
>> --
>> Lionel
>>
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Setting up a non-intrusive build cluster

2011-11-23 Thread Marc-André Laverdière
Working on that... it looks simple, but the code isn't giving me what I
expected...
/me grumbles looking at unknown APIs...

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




On Mon, Nov 21, 2011 at 7:15 AM, Lionel Elie Mamane wrote:

> On Mon, Nov 21, 2011 at 11:50:52AM +, Michael Meeks wrote:
> > On Sat, 2011-11-19 at 16:15 -0500, Marc-André Laverdière wrote:
>
> >> I am convincing some powers-that-be that having a build farm would
> >> be good, and they are starting to listen. This would really help me
> >> write patches for LO, as my poor computer is having impossibly long
> >> compile cycles.
>
> >> There is a bunch of somewhat old Linux workstations that could
> >> contribute to it. The concern is mostly that it should be so that the
> >> systems should not accept jobs when users are logged in, as it may
> >> interfere with whatever work it is that they are doing.
>
> Maybe more interesting than "nobody logged on" would be "system load
> very low", e.g. "load <= 0.1*(number of cores)", possibly combined
> with "free memory + memory used for cache >= threshold".
>
> >   I'm sure they'd accept a patch to add a config option to use some
> > system heuristic before accepting a job. Of course, reliably detecting a
> > login session is prolly quite fun in itself ;-) ps ax | grep
> > gnome-session | kdeinit or something ?
>
> Nah:
>
>   #include 
>
>   struct utmpx *getutxent(void);
>   struct utmpx *getutxid(const struct utmpx *);
>   struct utmpx *getutxline(const struct utmpx *);
>   struct utmpx *pututxline(const struct utmpx *);
>   void setutxent(void);
>   void endutxent(void);
>
> is the POSIX/SUS interface to do that. Or just run "/usr/bin/who -q"
> :)
>
> --
> Lionel
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Setting up a non-intrusive build cluster

2011-11-19 Thread Marc-André Laverdière
Hello,

I am convincing some powers-that-be that having a build farm would be good,
and they are starting to listen. This would really help me write patches
for LO, as my poor computer is having impossibly long compile cycles.

There is a bunch of somewhat old Linux workstations that could contribute
to it. The concern is mostly that it should be so that the systems should
not accept jobs when users are logged in, as it may interfere with whatever
work it is that they are doing.

The expected candidate is, of course, icecream. So, more pragmatically, is
there any way we could set it up so that the icecream daemon either shuts
down or stops taking jobs when a user logs in, and have it get back to life
when no users are logged in. This would have to include remote logins on
SSH too.

Any suggestions?

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] memory leaks found with valgrind

2011-11-18 Thread Marc-André Laverdière
I think we should have a tiny script with all those goodies to easily
invoke. Or some alias that gets set in Env.Host.sh

What do you think?

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




On Fri, Nov 18, 2011 at 5:32 AM, Michael Meeks wrote:

>
> On Thu, 2011-11-17 at 21:12 -0500, August Sodora wrote:
> > So hooray we save 160 bytes.
>
> Great :-) of course, that is the oosplash wrapper that -should-
> exit
> rather sooner than it does IMHO (I still need to look into that for
> 3.5). The main interest would be in running valgrind on soffice.bin (I
> assume you're following forks ?).
>
> >  The second initially makes me think that
> > a matching XCloseDisplay is missing but I'm not sure why the call that
> > is already there isn't getting called if the first leak was fixed:
> >
> > ==11027== 124 bytes in 1 blocks are definitely lost in loss record 6 of 8
> > ==11027==at 0x4A06031: malloc (vg_replace_malloc.c:236)
> > ==11027==by 0x3FA060BD79: get_peer_sock_name (xcb_auth.c:259)
> > ==11027==by 0x3FA060BE45: _xcb_get_auth_info (xcb_auth.c:302)
> > ==11027==by 0x3FA060B84E: xcb_connect_to_display_with_auth_info
> > (xcb_util.c:424)
>
> Of course this could just as easily be a leak in the X server;
> valgrind
> finds them all over the place :-) anyhow, good to have you chasing that.
> To debug leaks in soffice.bin you really need to:
>
>export G_SLICE=1
>
>Which makes LibO use the malloc allocator which valgrind can track
> instead of it's own internal one. If you have run 'linkoo' then source
> ooenv in program/ should set all that good stuff for you :-)
>
>Thanks !
>
>Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Unable to build moz

2011-11-17 Thread Marc-André Laverdière
That was the culprit!

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




On Thu, Nov 17, 2011 at 11:30 AM, Michael Meeks wrote:

>
> On Thu, 2011-11-17 at 17:17 +0100, Stephan Bergmann wrote:
> > > --with-system-dicts
> > > --enable-lto
> >
> > Maybe --enable-lto is not a good idea.
>
> Yep - highly experimental; which reminds me ... Jan - are you still
> stuck on compiling LibreOffice with LTO ? did we get to a point past the
> toolchain issues to a nice LibreOffice issue ? :-)
>
>All the best,
>
>Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Unable to build moz

2011-11-16 Thread Marc-André Laverdière
I tried that, made a make clean, and rebuilt. And now I have almost the
same thing in svtools

/home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libutllo.so:
undefined reference to `vtable for INetMIMEOutputSink'
/home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libvcllo.so:
undefined reference to `vtable for ErrorInfo'
/home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libvcllo.so:
undefined reference to `vtable for GZCodec'

So what am I doing wrong this time?

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




2011/11/16 saad igueninni 

> Can u try disabling mozilla as i said before.
>  with --*disable*-*mozilla.*
> *
> *
> *Cdt,*
> *SIG
> *
> Le 16 novembre 2011 17:23, Marc-André Laverdière <
> marcandre.laverdi...@gmail.com> a écrit :
>
>> Hi everyone,
>>
>> I had some help from shm_get on IRC yesterday. We disabled the system
>> libs in part but things are still not building after a make clean :(.
>>
>> My autogen options now are:
>> --with-num-cpus=4
>> --with-system-libs
>> --with-system-headers
>> --with-system-dicts
>> --enable-lto
>> --without-system-libvisio
>> --without-system-libexttextcat
>> --without-system-libcmis
>> --without-system-graphite
>> --without-system-lpsolve
>> --without-system-nss (that's the one I added)
>>
>> And the errors in building moz are now as follows:
>> /home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libutllo.so:
>> undefined reference to `vtable for INetMIMEOutputSink'
>> /home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libvcllo.so:
>> undefined reference to `vtable for ErrorInfo'
>> /home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libvcllo.so:
>> undefined reference to `vtable for GZCodec'
>>
>>
>>
>> Marc-André LAVERDIÈRE
>> "Perseverance must finish its work so that you may be mature and
>> complete,
>> not lacking anything." -James 1:4
>> http://asimplediscipleslife.blogspot.com/
>> mlaverd.theunixplace.com
>>
>>
>>
>>
>> On Wed, Nov 16, 2011 at 5:41 AM, Caolán McNamara wrote:
>>
>>> On Tue, 2011-11-15 at 17:12 -0500, Marc-André Laverdière wrote:
>>> > Hello,
>>> >
>>> > I can't build for a long long time on this Ubuntu box.
>>> > I have lots of error, but they all more or less look like this:
>>> >
>>> > (.text+0xaab): undefined reference to `SECITEM_CopyItem_Util'
>>> > /usr/lib/i386-linux-gnu/libcrmf.a(crmfcont.o): In function
>>> > `crmf_get_public_value':
>>>
>>> What's the exact configure options btw. Not that I have a clue, but good
>>> for reference. I'm guessing its fallout from nss/mozilla tweaking, but
>>> unsure if e.g. its stray libs in the solver and affects a
>>> complete-from-scratch build ? or only an incremental ?
>>>
>>> C.
>>>
>>>
>>
>> ___
>> LibreOffice mailing list
>> LibreOffice@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>>
>>
>
>
> --
> Saad Igueninni
>
> Consultant SAP HR
>
> ETCM Group
>
> Tel : +33 619026290
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Unable to build moz

2011-11-16 Thread Marc-André Laverdière
Hi everyone,

I had some help from shm_get on IRC yesterday. We disabled the system libs
in part but things are still not building after a make clean :(.

My autogen options now are:
--with-num-cpus=4
--with-system-libs
--with-system-headers
--with-system-dicts
--enable-lto
--without-system-libvisio
--without-system-libexttextcat
--without-system-libcmis
--without-system-graphite
--without-system-lpsolve
--without-system-nss (that's the one I added)

And the errors in building moz are now as follows:
/home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libutllo.so:
undefined reference to `vtable for INetMIMEOutputSink'
/home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libvcllo.so:
undefined reference to `vtable for ErrorInfo'
/home/marc-andre/libreoffice/core/solver/unxlngi6.pro/lib/libvcllo.so:
undefined reference to `vtable for GZCodec'


Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com




On Wed, Nov 16, 2011 at 5:41 AM, Caolán McNamara  wrote:

> On Tue, 2011-11-15 at 17:12 -0500, Marc-André Laverdière wrote:
> > Hello,
> >
> > I can't build for a long long time on this Ubuntu box.
> > I have lots of error, but they all more or less look like this:
> >
> > (.text+0xaab): undefined reference to `SECITEM_CopyItem_Util'
> > /usr/lib/i386-linux-gnu/libcrmf.a(crmfcont.o): In function
> > `crmf_get_public_value':
>
> What's the exact configure options btw. Not that I have a clue, but good
> for reference. I'm guessing its fallout from nss/mozilla tweaking, but
> unsure if e.g. its stray libs in the solver and affects a
> complete-from-scratch build ? or only an incremental ?
>
> C.
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Unable to build moz

2011-11-15 Thread Marc-André Laverdière
Hello,

I can't build for a long long time on this Ubuntu box.
I have lots of error, but they all more or less look like this:

(.text+0xaab): undefined reference to `SECITEM_CopyItem_Util'
/usr/lib/i386-linux-gnu/libcrmf.a(crmfcont.o): In function
`crmf_get_public_value':
(.text+0xae4): undefined reference to `SECITEM_ArenaDupItem_Util'
/usr/lib/i386-linux-gnu/libcrmf.a(crmfcont.o): In function
`crmf_encrypted_value_unwrap_priv_key':
(.text+0xb5f): undefined reference to `SECOID_GetAlgorithmTag_Util'
/usr/lib/i386-linux-gnu/libcrmf.a(crmfcont.o): In function
`crmf_encrypted_value_unwrap_priv_key':
(.text+0xb67): undefined reference to `SECOID_FindOIDByTag_Util'
/usr/lib/i386-linux-gnu/libcrmf.a(crmfcont.o): In function
`crmf_encrypted_value_unwrap_priv_key':

What is the library I a missing?

Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] RFC: Idea for fuzz-testing filters

2011-10-10 Thread Marc-André Laverdière
Hello everyone,

I have been struggling along the way and eventually put together this
small starting point... What do you think about it?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 10/07/2011 01:38 PM, Michael Meeks wrote:
> 
> On Fri, 2011-10-07 at 10:53 +0530, Marc-André Laverdière wrote:
>> I'm not thrilled with the idea of so much process creation and overhead
>> (think Valgrind) for running a somewhat short test over and over again.
> 
>   Certainly; the linking / bootstrapping overhead is rather substantial
> in comparison with loading a reasonably small document - at least from
> valgrind's perspective. Clearly passing a dozen documents to each
> command-line can help with that though.
> 
>   HTH,
> 
>   Michael.
> 
/*
 * Version: MPL 1.1 / GPLv3+ / LGPLv3+
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License or as specified alternatively below. You may obtain a copy of
 * the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * Major Contributor(s):
 * [ Copyright (C) 2011 Tata Consultancy Services, Ltd. Marc-André Laverdière 
 (initial developer) ]
 *
 * All Rights Reserved.
 *
 * For minor contributions see the git repository.
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
 * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
 * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 * instead of those above.
 */

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using namespace std;
using namespace boost::program_options;
using namespace boost::filesystem;
using namespace boost::filesystem3;
using namespace boost;

//constants
const string SEEDS_SUBFOLDER = "data";
const string RESULTS_SUBFOLDER = "results";
const string VALGRIND_COMMAND = "valgrind --tool=memcheck";

const string OPTION_HELP = "help";
const string OPTION_PROGRAM = "program";
const string OPTION_DIR = "dir";

const string TERMINATOR = "***^^^FILE_OVER@@@";

const unsigned char PATTERNS[] = {0xFF, 0xEF};

FILE * startProcess(string& command, string& directory)
{
stringstream concatenator;
concatenator << VALGRIND_COMMAND << " " << command << " " << directory;
return popen(concatenator.str().c_str(), "r");
}

string readProgramOutput(FILE * pipe, string& currentbuffer)
{
char buffer[128];
string result = "";
while(!feof(pipe)) {
if(fgets(buffer, 128, pipe) != NULL)
{
string sBuffer = string(buffer);
size_t terminatorLocation = sBuffer.find_last_of(TERMINATOR);
if (terminatorLocation < sBuffer.npos)
{ //we have a match
//do something
result += sBuffer.substr(0,terminatorLocation);
break;
}
else
result += sBuffer;
}
}

return result;
}

bool ensureDirectoryExists(const string& name)
{

path folder(RESULTS_SUBFOLDER);
if (!exists(folder))
{
create_directory(folder);
}
else if (!is_directory(folder))
{
cerr << "Error: " <<  name << " is not a directory" << endl;
return false;
}

return true;
}

string createBuggerFileName(string & base, uintmax_t offset, unsigned char 
pattern)
{
stringstream concatenator;
concatenator << base << "-" << dec << offset << "-pattern-" <<
hex << setiosflags (ios_base::showbase | ios_base::uppercase) << 
static_cast(pattern);
return concatenator.str();
}

string getRandomFileName()
{
boost::filesystem3::ifstream in("/dev/random");
stringstream concatenator;
concatenator < >(), "Program to run 
under Valgrind")
(OPTION_DIR.c_str(), value >(), "Directory to contain 
fuzzed files to test");
//Read the arguments
variables_map arguments;
store(parse_command_line(argc, argv, desc), arguments);


if (arguments.count(OPTION_PROGRAM) && arguments.count(OPTION_DIR))
{
string program = arguments[OPTION_PROGRAM].as >()[0];

Re: [Libreoffice] segfault in sc

2011-10-09 Thread Marc-André Laverdière
Hello,

Would you please run in Valgrind and give the output?

(I think) you just need to
/bin/sh
source ./Env.Host.sh
export VALGRIND=memcheck
cd sc
make -sr

The output would be in workdir/unxlngi6.pro/CppunitTest/

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 10/10/2011 03:57 AM, Markus Mohrhard wrote:
> Hello Julien,
> 
> 2011/10/9 julien2412 :
>> Hello,
>>
>> In sc, if i run make -sr, I've got this :
>> Error: UcbContentProviderProxy::getContentProvider - No provider for
>> 'com.sun.star.help.XMLHelp. From File
>> /home/maryline/compile-libreoffice/libo/ucb/source/core/provprox.cxx at Line
>> 400
>> Error: UcbContentProviderProxy::getContentProvider - No provider for
>> 'com.sun.star.help.XMLHelp. From File
>> /home/maryline/compile-libreoffice/libo/ucb/source/core/provprox.cxx at Line
>> 400
>> Error: UcbContentProviderProxy::getContentProvider - No provider for
>> 'com.sun.star.help.XMLHelp. From File
>> /home/maryline/compile-libreoffice/libo/ucb/source/core/provprox.cxx at Line
>> 400
>> Error: GetResultSet: Any other exception: Unable to create Content!  From
>> File /home/maryline/compile-libreoffice/libo/sfx2/source/bastyp/helper.cxx
>> at Line 161
>> Error: ContentBroker::initialize - already initialized! From File
>> /home/maryline/compile-libreoffice/libo/ucbhelper/source/client/contentbroker.cxx
>> at Line 186
>> Error: InitVersionMaps call multiple times From File
>> /home/maryline/compile-libreoffice/libo/sc/source/core/data/docpool.cxx at
>> Line 404
>> Error: no pool From File
>> /home/maryline/compile-libreoffice/libo/sfx2/inc/sfx2/shell.hxx at Line 281
>> Error: BitmapEx::BitmapEx( const ResId& rResId ): could not load image
>> <res/mainapp_16.png> From File
>> /home/maryline/compile-libreoffice/libo/vcl/source/gdi/bitmapex.cxx at Line
>> 119
>> Error: Forbidden Access to empty bitmap! From File
>> /home/maryline/compile-libreoffice/libo/vcl/source/gdi/bmpacc.cxx at Line 79
>> Error: BitmapEx::BitmapEx( const ResId& rResId ): could not load image
>> <res/mainapp_32.png> From File
>> /home/maryline/compile-libreoffice/libo/vcl/source/gdi/bitmapex.cxx at Line
>> 119
>> Error: Forbidden Access to empty bitmap! From File
>> /home/maryline/compile-libreoffice/libo/vcl/source/gdi/bmpacc.cxx at Line 79
>> Error: ContentBroker::initialize - already initialized! From File
>> /home/maryline/compile-libreoffice/libo/ucbhelper/source/client/contentbroker.cxx
>> at Line 186
>> Segmentation fault
>> make: ***
>> [/home/maryline/compile-libreoffice/libo/workdir/unxlngi6/CppunitTest/sc_filters_test.test]
>> Erreur 1
>>
> 
> This is a null pointer in sc's filters-test that I can nor reproduce
> but we have the same error in some tinderboxes. If your backtrace is
> correct (http://pastebin.com/NX7ngsfR) and SfxApplication is correctly
> constructed the only possible problem I see at the moment with:
> http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/appinit.cxx#235
> If this construction fails then we'll get an exception and
> SfxApplication is not initialized correctly otherwise this pointer
> should not be null.
> 
> It would be good if someone who has this error and knows either sc's
> filters-test (Michael, Caolan, Kohei, ...) or SfxApplication could
> have a look at it. I#m sorry but I tried to reproduce it here the
> whole weekend and none of my builds showed a similar crash.
> 
> Regards,
> Markus
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Color Management in Libreoffice

2011-10-09 Thread Marc-André Laverdière
Hi Nabil,

Good question. I don't have the answer to that, but my guess is that it
would be something like "busy fixing bugs" :)

LO is in need of motivated volunteers. It would be great to have some
help implementing this.

You could come on IRC and ask some pointers for implementation.
Until then, you can start downloading and building the source. It takes
a while, so you better start early :)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 10/09/2011 10:49 PM, Nabil Stendardo wrote:
> Hi,
> 
> I was just reading the Document Foundation wiki about Libreoffice. I
> read about all these feature requests, however one essential (however
> hard to implement) feature request seems to be missing: Color Management
> Support. If we had that, we would be IMHO lightyears ahead of the
> competition (I think even Microsoft Office doesn't have that), and for
> many pros, it is a must. The MIT-Licensed LittleCMS library might come
> in handy.
> 
> I would be willing to program that myself if I had more free time
> (and/or finances), but anyways I don't know anything about the
> LibreOffice codebase (never even compiled it).
> 
> I was just wondering how that was overlooked.
> 
> Nabil Stendardo
> MSc in Computer Science
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] RFC: Idea for fuzz-testing filters

2011-10-06 Thread Marc-André Laverdière
Thanks for your feedback.

I would really really like #1, but I'm not knowledgeable enough right
now to do that. If (God willing), I'm starting that PhD soon, I might
just be able to do that blindfolded a year from now :)

For #2, I would like to have a tool generate the format handled by
reading our source code. That would give something like 90% of the spec
generated for us. Then we can fill in the blanks. I'm guessing I could
do that in 2-3 more years of PhD than #1 ;)

As for #3, I haven't had good experience with zzuf. I used the
integrated option from CERT, only to have a few results in the log file
and no fuzzed file to repeat the test with.

I also used zzuf to generate test cases for the wmf filters, put the
results in indeterminate, and then export the VALGRIND variable and run
make -sr. Once that was done, I just had to read the report file for
valgrind errors. Not automated, but 'good enough'.

Problem is that it would saturate the disks pretty fast... so the
end-result is that I was spending more time babysitting The Monster (the
computer which was doing all those computations) than improving stuff.
Not ideal. And I'm talking about >30 Gb disk space filled up! And my
personal beef with zzuf is that the bytes are fuzzed randomly, which
means that you never know if that length field at offset 0xABCDEF was
even touched.

Running the whole of LO on a test case is going to take an enormous
amount of time. There is also the risk of having false positives for
things that would be slow to open (you have to set a time out, after
which it will kill the process).

I think we could have some zzuf going, because the probabilistic thing
could help find the kind of bugs that would be otherwise too expensive
to find deterministically (100 Kb file means a lot of combinations).
Maybe my suggestion could be used to generate a lot of seeds for zzuf.
It would guarantee that the specific byte was tampered with...

I'm not thrilled with the idea of so much process creation and overhead
(think Valgrind) for running a somewhat short test over and over again.

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 10/06/2011 12:01 PM, Huzaifa Sidhpurwala wrote:
> On 10/05/2011 06:41 PM, Caolán McNamara wrote:
>> caolanm->huzaifas: any advice ?
> 
> Nice to see the work you have been doing here!
> 
> To share some opinion about the my work which lead me to the discovery
> of CVE-2011-2713.
> 
> 1. There is no right or wrong approach here. A good approach would be
> the one which covers all the possible code paths or maximum possible
> ones in this case.
> 
> 2. Ideally Peachfuzz or any other intelligent fuzzers (ones available
> freely or custom ones) would be the best way to find flaws. But i will
> have to agree with you, the specs are too big in this case and the time
> taken to translate them into a fuzzer format is formidable.
> 
> 3. I was pointed at [1] by Caolan. How do you run these files through
> libreoffice after generating these test cases?. zzuf could actually
> create the test cases, run libreoffice, destroy them and cycle through
> this process as many times as you want. Saving on hard disk space? :)
> 
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] oox/source/drawingml/customshapepresets.cxx is just too much for gcc

2011-10-06 Thread Marc-André Laverdière
Wow, I really missed the 'big debate' :)

Anyways, here are some things that went on my mind going through the list:

- IIRC, some projects have build farms available... why is it we're not
using theirs to supplement ours?
I see here that GCC is willing to help any free software project:
http://gcc.gnu.org/wiki/CompileFarm
- Can we have distributed builds in non-Linux systems? If so, I think it
wouldn't be so hard to make the tinderboxes help each other in building
things
- I agree that an email to 200 people is not super interesting. I think
we should run git bisect to try building for every commit until we hit
one that breaks, or build on each commit. However, that is not so great
if we  have commits for which the thing is fixed in the next commit. I
am not expecting everyone to be comfortable with git rebase to the point
of merging commits all the time. But if we put such a policy in place,
it would help people learn very very fast :)
- Can we have some intermediary branch then? Or some 'proofed' branch?
If we build after each commit, the CI service can push that commit that
is OK to the 'proofed' branch, and then only those commits would be
tested with others. A failed commit would mean an email to the author
and/or commiter. Only after the commit is fixed will it reach 'proofed'.
And we could build nightly from 'proofed'.
- I don't think we can expect developers to run a build before each
push, especially not with all the debug options enabled and the like.
This would massively slow them down IMHO. We have a relatively high rate
of commits. It does happen from time to time that a commits comes in
just after you do your ./g pull -r ; make.
So you have to repeat the process, and that isn't so nice.
Now, if I have to build something a gazillion times slower before I can
push, will I _ever_ be able to push? I'm not asking rhetorically by the way.

Just my 2 paise :)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 10/07/2011 09:30 AM, Kevin Hunter wrote:
> At 6:28am -0400 Thu, 06 Oct 2011, Norbert Thiebaud wrote:
>> 2011/10/6 Norbert Thiebaud:
>>> I'll give it a shot...
>>
>> Not that I expect it to make a big difference... since most of the
>> compiles are ccached...
> 
> As an nth data point on the matter, I've been using ccache for awhile,
> and my builds take longer.  Anecdotally (because I'm not focused on
> ccache specifically), I turned it off the other day, and my builds
> reduced from about 2 hours to 1h15m.*  For reference, my ccache size is
> 8G, but only 1.8 G has been used.  My hits at about 12,000 are about
> half of my misses.
> 
> Cheers,
> 
> Kevin
> 
> * Both of those numbers are _very_ rough averages (created from memory
> of my "alias make='time make'" output), my builds compile in the
> background, at nice +19, on a puny dual-core 4G machine with a latent
> rotating HDD.  The majority of my builds are "./g pull -r; make" used
> for testing.  The less rough average is the "make distclean; ./g pull
> -r; make" workflow, which reduced a 3h30m compile to about 2h05m on the
> same hardware.
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] RFC: Idea for fuzz-testing filters

2011-10-05 Thread Marc-André Laverdière
Hi everyone,

Before I start writing code, I wanted to get the input of more
experienced developers.

Why bother about this? Why not use what's available out there? Well...
 - Fuzzgrind isn't well documented and won't work out of the box,
 - zzuf has too many bells and whistles, and won't guarantee that every
byte has been messed up with. I used it to generate a lot of cases, and
it fills a disk quickly enough
 - Peachfuzz and others that rely on a specification: well, we have file
formats with hundreds of pages specified.

Here is the idea:
One process if the fuzzer process, it does the following (pseudocode):

  spawn "valgrind test-program"
  for (i = 0; i < file.length; i++)
fuzzed = memcpy(file)
fuzzed[i] = 0xFF (or whatever)
write(temp-dir/random-name, fuzzed)
read output from the spawned process until the marker is read
if valgrind output is more than the expected valgrind start/end markers
  then copy valgrind output to results directory
  then copy fuzzed to results directory
if spawned program crashed then restart it

The other process would do as follows:
  while(forever)
check if a new file is in temp-dir
if the file name is "terminate-yourself", then exit
try to load the file with the filter
output a marker like " Done trying to load -"

With this design, we avoid a lot of process creation overhead.
We can probably generalize it enough that we can put pretty much any
filter in there.

What do you think of this idea? What improvements we can add?

Regards,

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED, partial][PATCH] Refactoring for WMF Loading

2011-10-04 Thread Marc-André Laverdière
Based on Caolan's comments, here's another attempt at doing things right.

I'm unable to test right now (some symlink problem)... please don't push
right away :)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 09/27/2011 06:25 PM, Caolán McNamara wrote:
> On Fri, 2011-09-23 at 16:36 +0530, Marc-André Laverdière wrote:
>> Hello everybody.
>>
>> Here is a patch from the "I have no idea what I'm doing" department.
> 
> 0001 looks good to me anyway, pushed now, sorry for the delay.
> 
> 0002 looks a bit more dubious, broad stroke fine, but isn't it the case
> that
> 
> +template 
> +void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const sal_Bool
> skipFirst)
> +{
> +sal_uInt16 nPoints ...
> 
> i.e. new code here has a 16bit value read from disk, while the old code
> appears to be a 32bit value. I know it gets casted to 16bits, but it
> would affect how much gets read from the stream.
> 
> ...
> 
> EnhWMFReader::ReadEnhWMF
> 
> ...  sal_uInt32 nPoints ...
> 
>case EMR_POLYBEZIER :
> -  {
> -  pWMF->SeekRel( 16 );
> -  *pWMF >> nPoints;
> 
>> P.S. I am not sure how to really test this... I just ran make -sr :)
> 
> yeah, that'll run the basic sanity wmf loader tests anyway. If you grab
> some .wmf's and just open them in draw that's another test-scenario,
> e.g. libwmf might have a selection if we don't have any already.
> 
> C.
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
> 
>From 57f80dbbc70ede3c86108fbc1abeb4bf265ea332 Mon Sep 17 00:00:00 2001
From: Marc-Andre Laverdiere 
Date: Tue, 20 Sep 2011 12:25:01 +0530
Subject: [PATCH] Refactoring drawing of polygons and polypolygons in
 enhwmf.cxx

---
 svtools/source/filter/wmf/enhwmf.cxx |  216 +-
 svtools/source/filter/wmf/winmtf.hxx |9 ++-
 2 files changed, 90 insertions(+), 135 deletions(-)

diff --git a/svtools/source/filter/wmf/enhwmf.cxx 
b/svtools/source/filter/wmf/enhwmf.cxx
index 1c83212..8ea6136 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -31,7 +31,7 @@
 
 #include "winmtf.hxx"
 #include 
-#include 
+#include 
 
 using namespace std;
 //=== GDI-Array ===
@@ -310,20 +310,43 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, 
sal_Bool& bHaveDC)
 
 /**
  * Reads polygons from the stream.
+ * The  parameter is for the type of the points (sal_uInt32 or 
sal_uInt16).
+ * The  parameter is a boost binding for the method that will 
draw the polygon.
+ * skipFirst: if the first point read is the 0th point or the 1st point in the 
array.
+ * */
+template 
+void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const sal_Bool skipFirst)
+{
+sal_uInt32 nPoints(0), nStartIndex(0);
+pWMF->SeekRel( 16 );
+*pWMF >> nPoints;
+if (skipFirst)
+{
+nPoints ++;
+nStartIndex ++;
+}
+
+Polygon aPolygon = ReadPolygon(nStartIndex, nPoints);
+drawer(pOut, aPolygon, skipFirst, bRecordPath);
+}
+
+
+/**
+ * Reads polygons from the stream.
  * The  parameter is for the type of the points
  * nStartIndex: which is the starting index in the polygon of the first point 
read
  * nPoints: number of points
  * pWMF: the stream containings the polygons
  * */
 template 
-Polygon EnhWMFReader::ReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 nPoints)
+Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints)
 {
 Polygon aPolygon(nPoints);
 for (sal_uInt16 i = nStartIndex ; i < nPoints && pWMF->good(); i++ )
 {
 T nX, nY;
 *pWMF >> nX >> nY;
-if (pWMF->good())
+if (!pWMF->good())
 break;
 aPolygon[ i ] = Point( nX, nY );
 }
@@ -331,6 +354,45 @@ Polygon EnhWMFReader::ReadPolygon(sal_uInt16 nStartIndex, 
sal_uInt16 nPoints)
 return aPolygon;
 }
 
+/**
+ * Reads a polyline from the WMF file and draws it
+ * The  parameter refers to the type of the points. (e.g. sal_uInt16 
or sal_uInt32)
+ * */
+template 
+void EnhWMFReader::ReadAndDrawPolyLine()
+{
+sal_uInt32  nPoints;
+sal_Int32   i, nPoly(0), nGesPoints(0);
+pWMF->SeekRel( 0x10 );
+// Number of Polygons:
+*pWMF >> nPoly >> nGesPoints;
+
+// taking the amount of points of each polygon, retrieving the total 
number of points
+if ( pWMF->good() &&
+ ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / 
sizeof(sal_uInt16) ) &&
+ ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt1

Re: [Libreoffice] 14 files in libreoffice git source flagged as trojans

2011-10-02 Thread Marc-André Laverdière
Hi Billy,

I'm a n00b and I faced the tall learning curve too.

I would say that things are easier than before to get started. The API
and Opengrok websites are really helping:
http://api.libreoffice.org/
http://opengrok.libreoffice.org/

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 09/30/2011 09:09 PM, Billy Charlton wrote:
> Ha, thanks for the warm welcome! What a difference :-)  
> 
> So, my pet peeve issue is a Calc bug/feature request first filed in
> *2003* -- and is in the OOo bugzilla
> at https://issues.apache.org/ooo/show_bug.cgi?id=10864 .  I actually
> filed one of the 12 dupes around 2006. The comment thread is pretty
> depressing.  Apparently not low-hanging fruit or this would have been
> fixed ages ago right?  It's a  frustrating UI issue for users who are
> accustomed to Excel. 
> 
> I always wondered if there was some dark reason this issue kept getting
> backburned when the project was still in OOo.
> 
> Anyway, I've done plenty of C++ and UI development projects so I'm not
> afraid of tackling it, but the codebase is pretty impenetrable for
> someone just starting out on this project.  Pointers welcome! 
> 
> ..Billy
> 
> 
> On Fri, Sep 30, 2011 at 1:47 AM, Michael Meeks  <mailto:michael.me...@novell.com>> wrote:
> 
> 
> On Thu, 2011-09-29 at 13:52 -0700, Billy Charlton wrote:
> > I just did my first git clone of the core libreoffice codebase, hoping
> > to poke around to see if I could start helping out with some
> > bugfixing.
> 
>Cool ! :-) what bug are you most interested in ? and/or have you
> grokked the easy hacks ? prolly the best way to get into the code is to
> ask questions and meet with the hackers on #libreoffice-dev on
> irc.freenode.net <http://irc.freenode.net> - if you're not familiar
> with IRC, it is really worth
> getting into it - for interactive discussion & mentoring.
> 
>There is a lot to do of course - one of the things that came up
> recently was the idea of getting:
> 
>http://code.google.com/p/include-what-you-use/
> 
>going, but that's prolly going to be quite a bit more
> difficult on
> Windows than Linux (many things are sadly).
> 
>Anyhow - great to have you around & thanks for the report,
> looks like
> we'll get a nice fix to hide the (apparent) badness in those files -
> which we use as regression tests.
> 
>All the best,
> 
>Michael.
> 
> --
> michael.me...@suse.com <mailto:michael.me...@suse.com>  <><, Pseudo
> Engineer, itinerant idiot
> 
> 
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] --enable-werror

2011-09-27 Thread Marc-André Laverdière
I actually like the auto-detect idea! As long as we still have an 
option to turn it off in case it is misbehaving :)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Tue 27 Sep 2011 02:03:59 PM IST, Michael Meeks wrote:
> Hi Marc,
>
> On Tue, 2011-09-27 at 10:06 +0530, Marc-André Laverdière wrote:
>> That experience lead me to believe that the policy 
>> should be "make it easy for the n00b".
>
>   Quite; easy, and friendly too :-)
>
>> When I tried using this flag, I ended up not being able to _build_ at 
>> all. And that wasn't even due to my own mistake, only some  module I 
>> know nothing at all is breaking the build.
>
>   Sure sure, so - I think Stephan has a point - that we ought to find
> some way of enabling this for some set of people that can cope with it.
> I suspect a good heuristic would be to have an 'auto' mode for the flag
> that checks if you have git push access and if so enables -Werror, so
> that old-hands get it automatically, and newbies don't suffer.
>
>> My point is that building for a n00b should be very simple.
>
>   Quite - it is difficult enough as it is; fret not - personally I'm not
> in favour of -Werror for all - only of the TSC deciding what to do
> here :-) We'll discuss it at our next meeting.
>
>   ATB,
>
>   Michael.
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Refactoring for WMF Loading

2011-09-27 Thread Marc-André Laverdière

/me bumps up the thread in the inboxes.

Anyone had time to look at those?

Thanks Scarabeus for the trick :)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 09/23/2011 04:36 PM, Marc-André Laverdière wrote:
> Hello everybody.
> 
> Here is a patch from the "I have no idea what I'm doing" department.
> 
> So I am not pushing it directly, as I want to avoid breaking something
> in LO. :D
> 
> Kudos to David Tardon for helping me with the boost stuff.
> 
> Essentially, there is a truckload of code duplication in the WMF
> loading, and this is an humble contribution to make things saner.
> 
> P.S. I am not sure how to really test this... I just ran make -sr :)
> 
> 
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] --enable-werror

2011-09-26 Thread Marc-André Laverdière
I think I wasn't clear.

I started doing things in LO when things were a lot harder than they 
are now. I'm glad for all the community members who have been putting 
order in this chaos. That experience lead me to believe that the policy 
should be "make it easy for the n00b".

When I tried using this flag, I ended up not being able to _build_ at 
all. And that wasn't even due to my own mistake, only some  module I 
know nothing at all is breaking the build. The best advice I got on IRC 
was to disable the flag!
And that was 1-2 months back, max.

My point is that building for a n00b should be very simple. And we can 
put that flag in the module-specific make file with the right switch. 
make -r is building, make -sr is building and running the unit testing, 
make -er would be building with all the restrictive flags.
Something like that...

What do you think?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Tue 27 Sep 2011 12:42:48 AM IST, Stephan Bergmann wrote:
> On 09/26/2011 01:15 PM, Marc-André Laverdière wrote:
>> I tried doing that, but it seems that my autogen flags made it so that I
>> was compiling some module unknown to me that was in 'build warning
>> land'.
>>
>> Unless we don't have modules living in such countries anymore, I won't
>> want to enable that option.
>>
>> I see this flag as an aspirational goal "let us fix all that stuff so
>> that we can -one day- compile everything that way"
>
> We were there already, and I think we still are there (at least on
> Linux with recent GCC, maybe it decayed on Windows).
>
>> I personally am against anything that makes it harder for a n00b like me
>> to get something done. The learning curve is not-so-easy so lets not
>> make it worse.
>
> For just compiling the sources, the default of --disable-werror is
> hence the way to go.  For actually making changes to the code, and
> especially doing so as a newbie -- what's wrong with the help offered
> by those compiler warnings?  (Given they are caused by your changes,
> not by code that was already dirty with warnings before you touched it
> -- which brings me back to the point that all developers should use
> --enable-werror all the time, to keep the master clean.)
>
> -Stephan
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] --enable-werror

2011-09-26 Thread Marc-André Laverdière
I tried doing that, but it seems that my autogen flags made it so that I
was compiling some module unknown to me that was in 'build warning land'.

Unless we don't have modules living in such countries anymore, I won't
want to enable that option.

I see this flag as an aspirational goal "let us fix all that stuff so
that we can -one day- compile everything that way"

I personally am against anything that makes it harder for a n00b like me
to get something done. The learning curve is not-so-easy so lets not
make it worse.

Just my 2 paisa...

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 09/26/2011 04:10 PM, Michael Meeks wrote:
> 
> On Mon, 2011-09-26 at 12:04 +0200, Stephan Bergmann wrote:
>> You mean, you let 
>> <http://cgit.freedesktop.org/libreoffice/core/commit/?id=0b24bd7a6ec714c74795cf417e35bd036303f3b9>
>>  
>> "hide a WaE... should be fixed properly when the issue is understood" 
>> through 
> 
>   Wait - is this the end of the world ? we had a completely benign
> warning on master ! :-) it lasted for a day or two, Norbert patched it
> out and mailed me, and I fixed it 'properly'.
> 
>   I'm sorry - I'm really not seeing the problem here.
> 
>> just because you think you can live without this helpful 
>> --enable-werror stuff?  Hm.
> 
>   I use the default compile flags; sometimes that means I break people
> that don't use the default compile flags; c'est la vie - on the other
> hand -a-little- breakage that is easily fixed is an -excellent-
> trade-off for pace of development.
> 
>   The 'good old' days - where all work had to be done in a branch, and
> then compiled on two platforms before merging is *gone* (and -very- good
> riddance). I'll personally stamp on anything that smells like an attempt
> to pull us back to that world -really- hard :-) JFYI. If brokenness gets
> to master, fine - we fix it ASAP, and hope that people commit features &
> fixes more frequently :-)
> 
>   I don't view a single transient warning as anything broken.
> 
>>> Sure - it'd be ideal; anyhow - help much appreciate on my favorite
>>> warning (of which I have several (tens?) of thousand when compiling):
>>>
>>> In file included
>>> from /data/opt/libreoffice/core/sw/source/core/doc/docfly.cxx:66:0:
>>> /data/opt/libreoffice/core/sw/source/core/inc/UndoAttribute.hxx:209:38:
>>> warning: 'auto_ptr' is deprecated (declared at /usr/include/c
>>> ++/4.5/backward/auto_ptr.h:86)
>>
>> Caolán already addressed that, didn't he?
> 
>   If by already - you mean on Friday evening :-) after much of the work
> was done - then - perhaps :-) but the reality is that we had a situation
> for several days with master giving tens of thousands of warnings while
> building.
> 
>   Traditionally Caolan and others building with -Werror have politely
> fixed the warnings they found as they went along, doing a very useful
> code cleaning service which is much appreciated. It is not something
> that is yet possible for everyone IMHO. As when it is, I'd welcome a
> formal proposal to turn -Werror-foo on by default at the TSC.
> 
>   ATB,
> 
>   Michael.
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] Refactoring for WMF Loading

2011-09-23 Thread Marc-André Laverdière
Hello everybody.

Here is a patch from the "I have no idea what I'm doing" department.

So I am not pushing it directly, as I want to avoid breaking something
in LO. :D

Kudos to David Tardon for helping me with the boost stuff.

Essentially, there is a truckload of code duplication in the WMF
loading, and this is an humble contribution to make things saner.

P.S. I am not sure how to really test this... I just ran make -sr :)

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India
>From 6dc35a5fefa9a1f812cbdbe502127ba84bc3a40a Mon Sep 17 00:00:00 2001
From: Marc-Andre Laverdiere 
Date: Mon, 19 Sep 2011 17:27:50 +0530
Subject: [PATCH 1/3] Minor refactoring on WMF loading

---
 svtools/source/filter/wmf/enhwmf.cxx |  136 +-
 svtools/source/filter/wmf/winmtf.hxx |3 +
 2 files changed, 55 insertions(+), 84 deletions(-)

diff --git a/svtools/source/filter/wmf/enhwmf.cxx 
b/svtools/source/filter/wmf/enhwmf.cxx
index 10fa8f3..618f13d 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -351,14 +351,14 @@ void EnhWMFReader::ReadGDIComment()
  * pWMF: the stream containings the polygons
  * */
 template 
-Polygon WMFReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 nPoints, SvStream& 
rWMF)
+Polygon EnhWMFReader::ReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 nPoints)
 {
 Polygon aPolygon(nPoints);
-for (sal_uInt16 i = nStartIndex ; i < nPoints && rWMF.good(); i++ )
+for (sal_uInt16 i = nStartIndex ; i < nPoints && pWMF->good(); i++ )
 {
 T nX, nY;
-rWMF >> nX >> nY;
-if (!rWMF.good())
+*pWMF >> nX >> nY;
+if (pWMF->good())
 break;
 aPolygon[ i ] = Point( nX, nY );
 }
@@ -366,6 +366,44 @@ Polygon WMFReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 
nPoints, SvStream& rWM
 return aPolygon;
 }
 
+template 
+void EnhWMFReader::ReadAndDrawPolyPolygon()
+{
+sal_uInt32  i, nPoly, nGesPoints, nPoints;
+pWMF->SeekRel( 0x10 );
+// Number of polygons
+*pWMF >> nPoly >> nGesPoints;
+if ( pWMF->good() &&
+( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && //check against 
numeric overflowing
+( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) &&
+( (  nPoly * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) ))
+{
+//Get number of points in each polygon
+sal_uInt16 * pnPoints = new sal_uInt16[ nPoly ];
+for ( i = 0; i < nPoly && pWMF->good(); i++ )
+{
+*pWMF >> nPoints;
+pnPoints[ i ] = (sal_uInt16)nPoints;
+} //end for
+if ( pWMF->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) <= ( 
nEndPos - pWMF->Tell() ) )
+{
+// Get polygon points
+Point * pPtAry  = new Point[ nGesPoints ];
+for ( i = 0; i < nGesPoints && pWMF->good(); i++ )
+{
+T nX, nY;
+*pWMF >> nX >> nY;
+pPtAry[ i ] = Point( nX, nY );
+} //end for
+// Create PolyPolygon Actions
+PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
+pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
+delete[] pPtAry;
+} //end if
+delete[] pnPoints;
+} //end if
+}
+
 sal_Bool EnhWMFReader::ReadEnhWMF()
 {
 sal_uInt32  nStretchBltMode = 0;
@@ -452,7 +490,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 i++;
 nPoints++;
 }
-Polygon aPoly = WMFReadPolygon(i, nPoints, *pWMF);
+Polygon aPoly = ReadPolygon(i, nPoints);
 pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath );
 }
 break;
@@ -461,7 +499,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 {
 pWMF->SeekRel( 16 );
 *pWMF >> nPoints;
-Polygon aPoly = WMFReadPolygon(0, nPoints, *pWMF);
+Polygon aPoly = ReadPolygon(0, nPoints);
 pOut->DrawPolygon( aPoly, bRecordPath );
 }
 break;
@@ -478,7 +516,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 i++;
 nPoints++;
 }
-Polygon aPolygon = WMFReadPolygon(i, nPoints, 
*pWMF);
+Polygon aPolygon = ReadPolygon(i, nPoints);
 pOut->DrawPolyLine( aPolygon, bFlag, bRecordPath );
 }
 break;
@@ -523,42 +561,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 
 case EMR_POLYPOLYGON :
 {
-sal_uInt32  i, nPoly, nGesPoints;
-pWMF->SeekRel

Re: [Libreoffice] Proposal: slowcheck -- a new gbuild toplevel target

2011-09-20 Thread Marc-André Laverdière
I like the idea, personally.

I was toying with the idea of also have a target for fuzz testing 
stuff. So that could be done at the same time too!

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Tue 20 Sep 2011 02:57:26 PM IST, Markus Mohrhard wrote:
> Hello all,
> 
> 2011/9/20 Caolán McNamara mailto:caol...@redhat.com>>
> 
> On Mon, 2011-09-19 at 21:18 +0200, Bjoern Michaelsen wrote:
> > I am proposing introducing a new target in the build system called
> > "slowunitcheck". Those are tests that are technically unittests (need
> > no full install), but considered to slow/longrunning to be run on
> every
> > build. Instead those are run along the subsequenttests when running
> > "make check" (or alone by running "make slowunitcheck").
> >
> > Opinions?
> 
> If the goal is to support e.g. calc guys rebuilding fast when hacking
> sc, the more natural approach to me would be an extra non-unit-test
> module-level target, e.g. cd sc; make skipchecks or some such, an
> explicit opt-out-for-this-rebuild rather than out-in.
> 
> I wonder exactly why/where the sc tests are slow, I mean linking the big
> test libs is definitely slow, is that the critical part of the
> slowdown ? Or is it running the tests ?
> 
> I'd kind of expect that linking the test would take the vast majority of
> time, if that's the case then for meaningful speedup the creation of the
> test would need to be skipped as well as the execution ?
> 
> 
> The sc unit tests are slow because we use the filter-tests as an way to
> test not only the import but also the first recalculation. We havenow
> already about 10 files that we import and check and I have some
> additional that are not yet finished. Then I'm working at the moment on
> an similar approach to test vba code in sc. The problem with all these
> tests is that most of them are only relevant for certain cases and I
> think for example the bugFix files don't need to be executed by everyone.
> 
> I personally don't see the problem with calc devs here, but that as soon
> as they get slower and other people complain about them they might
> consider to skip all tests. So I prefer that everyone executes at least
> a basic set of tests during every build than someone skipping all tests
> because some special tests are too slow.
> 
> Regards,
> Markus
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java baseline is 1.5, right?

2011-09-19 Thread Marc-André Laverdière
Can we keep it in with a 'use at your own risk and peril'?
I don't think that spending energy on 1.4 bugs is wise, but if someone 
finds them, let 'em fix.

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Thu 15 Sep 2011 07:15:06 PM IST, Bjoern Michaelsen wrote:
> On Thu, 15 Sep 2011 15:38:04 +0200
> Fridrich Strba
> 
> wrote:
> 
>> Hello, Michael,
>>
>> On 15/09/11 15:06, Michael Stahl wrote:
>>> just noticed David's commit to move around the fix for a broken IBM
>>> LinuxPPC JRE:
>>> http://cgit.freedesktop.org/libreoffice/core/commit/?id=ab5ce3f70a5635c3ca141b5c8928a104b522e1bb
>>> AFAIK the OOo JRE baseline was raised to 1.5 some years ago, right?
>>> so 1.4 seems obsolete and we can get rid of it now?
>>
>> No real baseline for us here. It is true that our release builds for
>> linux, we build them with --with-java-target-version=1.5 using 1.6 as
>> javac. Nevertheless, if a fix for 1.4 is reasonably cheap, it cannot
>> be bad to keep it building.
> 
> OTOH 'mostly working on 1.4' doesnt help anybody and creates useless
> bug traffic -- better clearly state its unsupported and be done with
> it. And even small fixes for obsolete stuff can stack quite high (just
> look at all the Win16 optimizations in the codebase).
> 
> Best,
> 
> Bjoern
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] git account request

2011-09-12 Thread Marc-André Laverdière
+1. I would really like that too!!!

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Mon 12 Sep 2011 02:37:20 AM IST, Olivier Hallot wrote:
> Hi Marco
> 
> Do you mind to write some lines on how you succeded to have the big
> source code set under Eclipse CDT?
> 
> Thanks in advance
> 
> Olivier
> 
> Em 11-09-2011 17:14, Marco escreveu:
>>
>> Hi Thorsten,
>> I completed the switch to the new unified repository, everything
>> built smoothly and I also succeeded in configuring eclipse cdt with
>> the new big source code set. Now before bringing my project forward
>> I'm going to request a git repo account through Freedesktop bugzilla
>> site. I created a new feature branch named "feature/svg-anims" that
>> I'll push as soon as I commit something new.
>>
>> Cheers,
>> Marco
>>
>>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] License for my patches

2011-09-08 Thread Marc-André Laverdière
Thanks for pointing out to that wiki page. I had missed it too!!!

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Thu 08 Sep 2011 09:13:56 PM IST, Regina Henschel wrote:
> Hi,
> 
> I want to add me to
> http://wiki.documentfoundation.org/Development/Developers and noticed
> that there is no public license statement yet. So for the records:
> All my patches are under LGPLv3+/MPL. This holds for new patches too
> until I explicitly revoke this statement.
> 
> Kind regards
> Regina
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Watch out for 64 bit errors

2011-09-06 Thread Marc-André Laverdière
Hi everyone,

I saw this article in a security mailing list, and I thought it was
relevant for all the LO devs too, as our code needs to work both on 32
and 64 bits :)

http://software.intel.com/en-us/articles/collection-of-examples-of-64-bit-errors-in-real-programs/

Sadly, the code samples are for Windoze, but I see a lot of tricky
things to keep in mind.

Regards,

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] about the removing of binfilter

2011-08-21 Thread Marc-André Laverdière
I think that one good selling point for LO is that it can be the VLC of 
documents, meaning that it can/should handle anything you throw at it.

If we migrate things to an extension, that'd not be a big deal, but 
then that is like transforming VLC into gstreamer. It requires a tiny 
bit more work to get it to work for your use case.

Is there a way to modularize it enough so that we could have a LO 
'light' and a LO 'full' release?

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Sat 20 Aug 2011 11:55:54 AM IST, Norbert Thiebaud wrote:
> On Sat, Aug 20, 2011 at 12:19 AM, Kálmán „KAMI” Szalai
>  wrote:
>> HI!
>>
>> On 2011-05-31 10:46, Michael Meeks wrote:
>>> Come LibreOffice 4 the plan is to rip out the legacy staroffice binary
>>> formats import filter to avoid the maintenance burden, build time, and
>>> download size. If someone does the work to maintain it and/or turn it
>>> into an extension is up to them - there is no-one stopping that.
>>> Perhaps by whacking vcl, basic, svtools, framework, connectivity etc.
>>> and statically linking them into there we can make it much more self
>>> contained anyway. ATB, Michael.
> 
>> Whit this changes how many workhour,
> presumably not that much since no-one is working on it... but still
> now and again a change in core trigger a breakage in binfitler that
> need fixing...
> Of course that is not counting the work hours that would have to be
> expended when someone report that there are actually broken and need
> fixing...
> nor is that counting the hours spent testing it (if we deliver it an
> claim to support it, there should be some QA on it right? )
> 
>> build time,
> On my linux tinbuild, with perfect ccache hit, buidling that represent
> a 12% increase on the build time of that box.
> 
>> download size
> On Mac, about 30MB, Linux about 35MB.
> 
>> can be saved per release?
> 
> Norbert
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Libre ........congrats

2011-08-19 Thread Marc-André Laverdière
Thanks for sharing. It is good to hear back from happy users every now 
and then!

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Sat 13 Aug 2011 05:56:07 PM IST, PE wrote:
> Gentlemen, Ladies,
>  I'd tip my hat to you, did i have a hat.
> I live with XL. Have for many years now, have tried all the
> alternatives. Still use 2003, hate (HATE!) the ribbon
> Downloaded your suite earlier this morning. I am very MUCH impressed. Much.
> 
> Will share with others.
> 
> Thank you.
> 
> 
> 
> 
> 
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] UNO API reference?

2011-08-18 Thread Marc-André Laverdière
Is there any way we could have our own api website too? And possibly 
improve the documentation?
Could we do that under a nice license like CC-non commercial?

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Thu 18 Aug 2011 02:04:11 AM IST, Cor Nouws wrote:
> Kevin Hunter wrote (17-08-11 17:35)
>> At 11:27am -0400 Wed, 17 Aug 2011, Caolán Mcnamara wrote:
> 
>> Okay, those are some links that I was missing. Thank you all 3 for your
>> help.
> 
> IIRC, those were referenced too from somewhere on the api.openoffice.org
> site.
> Though not comprehensive in every detail, I always was (still am) glad
> with the guidance etc I had from that place. And I'm sure that is the
> same for many more people.
> 
> Kind regards,
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] One Git Conversion Done. new repos online

2011-08-07 Thread Marc-André Laverdière
Hi everyone,

If you are behind a firewall like me and you previously have corkscrew 
set up, you can use this URL:
git clone ssh://git.freedesktop.org/git/libreoffice/core.git

Of course, that one requires you to have commit access.

-- 
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On Sun 07 Aug 2011 11:34:11 PM IST, Norbert Thiebaud wrote:
> On Sun, Aug 7, 2011 at 12:33 PM, Kohei Yoshida  
> wrote:
>> Hi Norbert,
>>
>> On Sat, Aug 6, 2011 at 4:38 PM, Norbert Thiebaud  wrote:
>>> The One Git conversion is done.
>>
>> Just want to make sure I understand our plan correctly.  The core
>> repository is for the master branch and future releases, while the 3.4
>> releases and older will still be done in the old split repositories.
>> Correct?
> 
> yes
> 
> Norbert
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] link error in comhelper with undefined references from ucbhelper

2011-08-04 Thread Marc-André Laverdière
Hi Eike, Caolan, *

I recall that some exploits in the past have been done by linking to a
symbol that wasn't hidden but should've... in other words the attackers
bypassed the method/function with the argument validity checks.

So here's my follow-up question :)
Anything in that/those module(s) that have some critical operation? Like
password-protecting the file? Any operation considered privileged?
Anything that edits the registry of extensions?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 08/05/2011 03:22 AM, Eike Rathke wrote:
> Hi Caolán,
> 
> On Thursday, 2011-08-04 21:22:54 +0200, Eike Rathke wrote:
> 
>>> I don't think moving from dmake to gnumake should affect this.
>> I think it did..
>>
>> But I was lying when I said before the symbols were there, well, they
>> are, but local, nm gives 't' instead of 'T'. Apparently the gnumake
>> transition switched visibility to all-off. Looking at the dmake build
>> there was ucbhelper.flt used to build the ignore list for exports.
> 
> Indeed, I rebuilt ucbhelper with HAVE_GCC_VISIBILITY_FEATURE=FALSE and
> now comphelper linked fine. This of course is only a temporary
> workaround and probably needs to be repeated for each module that
> previously used a .flt list, resulting in bloated public symbols tables.
> 
>   Eike
> 
> 
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Small Question About sal_* Types

2011-08-01 Thread Marc-André Laverdière
I remember that one rocket disintegrated because of an issue of types...
https://secure.wikimedia.org/wikipedia/en/wiki/Ariane_5_Flight_501

Thankfully, LO shouldn't be used in this way... but mismatching of types
(especially between modules) can be a source of a gazillion bugs and a
few security issues. I guess that is the reason why POSIX and Windows
APIs have created all sorts of types like HANDLE and size_t :)

I am inclined to think that we should follow suit and standardize on the
sal_* types, and not just on the boundaries. We are already in the
process of fixing our internals with vectors and different string APIs,
so that change could be done gradually as we go along.

Just my 2 paisa ;)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/27/2011 10:25 AM, Norbert Thiebaud wrote:
> 2011/7/26 Marc-André Laverdière :
>> This patch is bringing up a small question:
>>
>> I thought we were trying to standardize the code to use sal_* types
>> everywhere...
>>
>> Can anyone confirm/deny that?
>>
> 
> and also, more generally for local variable that have no impact
> what-so-ever with UNO interface it is ok to use standard type like
> size_t
> 
> I _personnaly_ (as-in that is not necessarily a consensus view) think
> that sal_* type should be reserved exclusively for UNO interface. and
> for stuff that need 'cross-platform' serialization in general. that
> would have the merit of drawing attention to these border-zone.
> But of course that benefit would require a complete an systematic
> review of sal_* usage... which is not practical... so the compromise
> is use sal_* for sure in UNO case and serialisation case, but other
> than that, let dev be and use sane standard type if they want to.
> 
> 
> Norbert
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Request for a VM

2011-08-01 Thread Marc-André Laverdière
Hello,

I am not sure what exactly you are asking for. My desktop is F15 and I
run a virtual machine on my desktop all the time. VirtualBox OSE is free
software, and Fedora is free software. So it should be easy :)

Maybe I got your question wrong... would you please rephrase?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 08/01/2011 10:13 PM, Danishka Navin wrote:
> Hi,
> 
> As you may know Fedora 14 does not release F14 based Libo RPMs but for F15.
> I would like to take care of building Libo for F14.
> 
> If some one install Libo RPMs manually he/she wont get automatic updates.
> I am trying to maintain a repository where users can easily install Libo
> on F14 using the YUM.
> 
> Highly appreciate if I could get a VM to start the build process.
> 
> -- 
> Danishka Navin
> http://danishkanavin.blogspot.com
> http://twitter.com/danishkanavin
> http://identi.ca/danishka
> http://www.flickr.com/photos/danishkanavin/
> 
> 
> 
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Java 7 - not recognised in LO in Windows Vista

2011-07-31 Thread Marc-André Laverdière
+1 There is no point to invest insane amounts of time in weird
compatibility voodoo magic for something that will be fixed in 1-2 weeks.

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/30/2011 05:27 PM, Francois Tigeot wrote:
> On Thu, Jul 28, 2011 at 11:25:47PM +0200, Florian Effenberger wrote:
>> JFYI, don't know if this is a valid issue, but wanted to share
>>
>>  Original Message 
>> Subject: [tdf-discuss] Java 7 - not recognised in LO in Windows Vista
>> Date: Thu, 28 Jul 2011 21:36:26 +0100
>> From: Mike Hall 
>> Reply-to: disc...@documentfoundation.org
>> To: disc...@documentfoundation.org
>>
>> Noticed by chance that Java 7.0 was released today. It's not in the
>> normal update cycle yet, but you can download it from:
>> www.oracle.com/technetwork/java/javase/downloads/java-se-jre-7-download-432155.html
>>
>> It installs and works fine in a number of apps (eg Jedit), but I can't
>> get LO 3.4.1 to recognise it, not even when given what should be the
>> right path (via Tools > Options > Java > Add)
>>
>> Just wondering whether this is something that needs to be looked at
>> before 3.4.2 is released as I expect it will soon become the standard
>> Java release?
> 
> It seems Java 7 has been knowingly released with critical bugs:
> 
> http://www.lucidimagination.com/blog/2011/07/28/dont-use-java-7-for-anything/
> 
>   "These problems were detected only 5 days before the official Java 7 
> release,
>   so Oracle had no time to fix those bugs"
> 
> They knew before the release date their product was broken and they still
> shipped it. Unbelievable.
> 
> Instead of taking steps to enable the use of Java 7, we may want to actively
> discourage it for now.
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Build Failed -- Any Ideas?

2011-07-31 Thread Marc-André Laverdière
Hi Swagat,

I had such an error before, because I was running make dev-install
without running make before.

Actually, things have changed a little in the build system now, and we
are supposed to run make dev-install only after the first build is done.
After that, make does the job.

Is that what was going on?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/30/2011 03:31 PM, swagat sharma wrote:
> Hi all,
> 
> Any idea about the following error?? what is wrong?
> 
> ***
> Successful packaging process!
> ***
> ... creating log file log_OOO350_en-US.log 
> ... creating "follow me" info file follow_me_OOO350_en-US.log.
> Sat Jul 30 15:15:34 2011 (00:48 min.)
> Installer finished
> : &&
> LD_LIBRARY_PATH=/home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/clone/testing/smoketestoo_native/unxlngx6.pro/lib:/home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
> <http://unxlngx6.pro/lib:/home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}>
>  
> /home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/bin/cppunit/cppunittester
> <http://unxlngx6.pro/bin/cppunit/cppunittester> \
>   
>  
> -env:UNO_SERVICES=file:///home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/xml/ure/services.rdb
> <http://unxlngx6.pro/xml/ure/services.rdb> \
>   
>  
> -env:UNO_TYPES=file:///home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/bin/types.rdb
> <http://unxlngx6.pro/bin/types.rdb> \
>   
>  
> -env:arg-soffice=path:/home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/installation/opt/program/soffice
> <http://unxlngx6.pro/installation/opt/program/soffice>
> -env:arg-user=./unxlngx6.pro/misc/smoketest/user
> <http://unxlngx6.pro/misc/smoketest/user> \
>   
>  -env:arg-env=LD_LIBRARY_PATH"${LD_LIBRARY_PATH+=$LD_LIBRARY_PATH}"
> -env:arg-testarg.smoketest.doc=/home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/bin/smoketestdoc.sxw
> <http://unxlngx6.pro/bin/smoketestdoc.sxw> --protector \
>   
>  
> /home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/solver/350/unxlngx6.pro/lib/unoexceptionprotector.so
> <http://unxlngx6.pro/lib/unoexceptionprotector.so> \
> unoexceptionprotector ./unxlngx6.pro/lib/libsmoketest.so
> <http://unxlngx6.pro/lib/libsmoketest.so>
> LibreOffice: Using system memory allocator.
> LibreOffice: This is for debugging only.  To disable,
> LibreOffice: unset the environment variable G_SLICE.
> LibreOffice: Using system memory allocator.
> LibreOffice: This is for debugging only.  To disable,
> LibreOffice: unset the environment variable G_SLICE.
> This used to be an assertion failure: Desktop disposed before
> terminating it,
> but nothing bad seems to happen anyway?
> This used to be an assertion failure: Desktop not terminated before
> being destructed,
> but it is probably not a real problem.
> Error: File
> /home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/framework/source/jobs/jobexecutor.cxx,
> Line 163: JobExecutor::~JobExecutor()
> Configuration don't send dispoing() message!
> 
> Exited with code '-1'
> officeconnection.cxx:140:Assertion
> Test name: N12_GLOBAL__N_14TestE::test
> setUp() failed
> - equality assertion failed
> - Expected: 2
> - Actual  : 0
> 
> Failures !!!
> Run: 1   Failure total: 1   Failures: 1   Errors: 0
> dmake:  Error code 1, while making 'cpptest'
> 
> ---
> Oh dear - something failed during the build - sorry !
>   For more help with debugging build errors, please see the section in:
> http://wiki.documentfoundation.org/Development
> 
>   internal build errors:
> 
> ERROR: error 65280 occurred while making
> /home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/smoketestoo_native
> 
>  it seems that the error is inside 'smoketestoo_native', please re-run build
>  inside this module to isolate the error and/or test your fix:
> ---
> 
> rm -Rf
> /home/eswagsh/Documents/LibreOffice_Sourc_Code/libo/smoketestoo_native/unxlngx6.pro
> <http://unxlngx6.pro> # optional module 'clean'
> /bin/bash
> cd /home/eswagsh/Documents/LibreOffice_Sourc_

[Libreoffice] Small Question About sal_* Types

2011-07-26 Thread Marc-André Laverdière
This patch is bringing up a small question:

I thought we were trying to standardize the code to use sal_* types
everywhere...

Can anyone confirm/deny that?

Regards,

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/27/2011 06:54 AM, Kohei Yoshida wrote:
>  sw/source/filter/html/parcss1.cxx |4 ++--
>  sw/source/filter/html/parcss1.hxx |3 +--
>  sw/source/filter/html/svxcss1.cxx |   29 +
>  sw/source/filter/html/svxcss1.hxx |   13 -
>  4 files changed, 16 insertions(+), 33 deletions(-)
> 
> New commits:
> commit 04113a04a20d758d914833fc22d646831478bf1b
> Author: Kohei Yoshida 
> Date:   Tue Jul 26 21:18:06 2011 -0400
> 
> Replace SV_*_PTRARR with boost::ptr_vector.
> 
> diff --git a/sw/source/filter/html/parcss1.cxx 
> b/sw/source/filter/html/parcss1.cxx
> index 5c0955f..3f3ccde 100644
> --- a/sw/source/filter/html/parcss1.cxx
> +++ b/sw/source/filter/html/parcss1.cxx
> @@ -1230,10 +1230,10 @@ sal_Bool CSS1Parser::ParseStyleOption( const String& 
> rIn )
>  return sal_True;
>  }
>  
> -sal_Bool CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, 
> sal_Bool /*bFirst*/ )
> +bool CSS1Parser::SelectorParsed( CSS1Selector* /* pSelector */, bool 
> /*bFirst*/ )
>  {
>  // Selektor loeschen
> -return sal_True;
> +return true;
>  }
>  
>  sal_Bool CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
> diff --git a/sw/source/filter/html/parcss1.hxx 
> b/sw/source/filter/html/parcss1.hxx
> index 3a6fa46..5df550b 100644
> --- a/sw/source/filter/html/parcss1.hxx
> +++ b/sw/source/filter/html/parcss1.hxx
> @@ -270,8 +270,7 @@ protected:
>  // Deklaration. Wird sal_True zurueckgegeben, wird der Selektor
>  // geloscht, sonst nicht.
>  // Die Implementierung dieser Methode gibt nur sal_True zuruck.
> -virtual sal_Bool SelectorParsed( const CSS1Selector *pSelector,
> - sal_Bool bFirst );
> +virtual bool SelectorParsed( CSS1Selector* pSelector, bool bFirst );
>  
>  // Diese Methode wird fuer jede geparsete Property aufgerufen. Wird
>  // sal_True zurueckgegeben wird der Selektor geloscht, sonst nicht.
> diff --git a/sw/source/filter/html/svxcss1.cxx 
> b/sw/source/filter/html/svxcss1.cxx
> index 2fcf673..93b5fad 100644
> --- a/sw/source/filter/html/svxcss1.cxx
> +++ b/sw/source/filter/html/svxcss1.cxx
> @@ -71,11 +71,6 @@ typedef void (*FnParseCSS1Prop)( const CSS1Expression 
> *pExpr,
>   SvxCSS1PropertyInfo& rPropInfo,
>   const SvxCSS1Parser& rParser );
>  
> -SV_IMPL_PTRARR( CSS1Selectors, CSS1Selector* )
> -
> -
> -/*  */
> -
>  static CSS1PropertyEnum const aFontSizeTable[] =
>  {
>  { sCSS1_PV_xx_small, 0   },
> @@ -720,31 +715,26 @@ sal_Bool SvxCSS1Parser::StyleParsed( const CSS1Selector 
> * /*pSelector*/,
>  return sal_True;
>  }
>  
> -sal_Bool SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
> -sal_Bool bFirst )
> +bool SvxCSS1Parser::SelectorParsed( CSS1Selector *pSelector, bool bFirst )
>  {
>  if( bFirst )
>  {
>  OSL_ENSURE( pSheetItemSet, "Where is the Item-Set for Style-Sheets?" 
> );
>  
> -// Dieses ist der erste Selektor einer Rule, also muessen
> -// die bisher geparsten Items auf die Styles verteilt werden
> -//   pSheetPropInfo->CreateBoxItem( *pSheetItemSet, 
> GetDfltBorderDist() );
> -for( sal_uInt16 i=0; i +for (size_t i = 0; i < aSelectors.size(); ++i)
>  {
> -StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
> +StyleParsed( &aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
>  }
>  pSheetItemSet->ClearItem();
>  pSheetPropInfo->Clear();
>  
>  // und die naechste Rule vorbereiten
> -if( aSelectors.Count() )
> -aSelectors.DeleteAndDestroy( 0, aSelectors.Count() );
> +aSelectors.clear();
>  }
>  
> -aSelectors.C40_INSERT( CSS1Selector, pSelector, aSelectors.Count() );
> +aSelectors.push_back(pSelector);
>  
> -return sal_False; // den Selektor haben wir gespeichert. Loeschen 
> toedlich!
> +return false; // den Selektor haben wir gespeichert. Loeschen toedlich!
>  }
>  
>  
> @@ -840,14 +830,13 @@ sal_Bool SvxCSS1Parser::ParseStyleSheet( const String& 
> rIn )
>  
>  sal_Bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
>  
> -for( sal_

Re: [Libreoffice] [MERGED and PUSHED] Brace for impact - gnumake4 to hit master

2011-07-24 Thread Marc-André Laverdière
Monday 11AM IST:
./g pull -r; autogen.sh; make dev-install

Environment: Fedora 15 with Gnu Make 3.82

resulted in a successful build and I was able to open a document.
So no apparent breakage for the older build systems in place.

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/25/2011 12:23 AM, Bjoern Michaelsen wrote:
> On Sat, 23 Jul 2011 04:10:37 +0200
> Bjoern Michaelsen
>  wrote:
> 
> 
>> If nobody protests, I will merge the branch to master on Sunday
>> afternoon, so that I wont break the master for volunteers on the
>> weekend, and so that we have good tinderbox result on Monday.
> 
> Done.
> 
> Best,
> 
> Bjoern
> 
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Error compiling from master inside vcl

2011-07-22 Thread Marc-André Laverdière
Undefined references are typically because of a change that is missing
on your copy of the repo.

I would do the following: ./g pull -r ; autogen.sh; make dev-install

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/21/2011 10:57 PM, Andreas Mantke wrote:
> Hi Caolan, Michael, *,
> 
> Am Donnerstag, 21. Juli 2011, 12:58:53 schrieb Caolán McNamara:
>> There's no actual compiler/linker error included in that log. Its a
>> parallel build and the error messages from vcl itself are probably mile
>> back in your buffer. Just do a make -sr in vcl which is the reported
>> failed module and post the results here.
>>
>> Your very first post had the type of information that is useful, e.g.
>> the linker errors. Assuming its still the same "missing glib and gtk"
>> symbols error as reported as the last blocker, then we probably need to
>> see the link line to see whether the libs for glib/gtk are missing from
>> the command line, or if they are present but just not working, e.g.
>> wrong architecture. Seeing as there are stacks of SuSE people building
>> every day it must be a fairly trivial glitch.
> 
> yes, you are right. If I go to the vcl module and build there with make -r 
> after a rm 
> -Rf of unxlngx6.pro I got the old error messages:
> 
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::IMHandler::signalIMPreeditChanged(_GtkIMContext*, 
> void*)':
> gtkframe.cxx:(.text+0x991f): undefined reference to 
> `gtk_im_context_get_preedit_string'
> gtkframe.cxx:(.text+0x9a56): undefined reference to 
> `pango_attr_list_get_iterator'
> gtkframe.cxx:(.text+0x9a6a): undefined reference to 
> `pango_attr_iterator_range'
> gtkframe.cxx:(.text+0x9aa4): undefined reference to `g_utf8_pointer_to_offset'
> gtkframe.cxx:(.text+0x9ab9): undefined reference to `g_utf8_pointer_to_offset'
> gtkframe.cxx:(.text+0x9ac5): undefined reference to 
> `pango_attr_iterator_get_attrs'
> gtkframe.cxx:(.text+0x9b07): undefined reference to `pango_attribute_destroy'
> gtkframe.cxx:(.text+0x9b2a): undefined reference to `pango_attribute_destroy'
> gtkframe.cxx:(.text+0x9b49): undefined reference to `g_slist_free'
> gtkframe.cxx:(.text+0x9b83): undefined reference to `pango_attr_iterator_next'
> gtkframe.cxx:(.text+0x9b9d): undefined reference to `g_free'
> gtkframe.cxx:(.text+0x9ba7): undefined reference to `pango_attr_list_unref'
> gtkframe.cxx:(.text+0x9cf4): undefined reference to `g_free'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::EndSetClipRegion()':
> gtkframe.cxx:(.text+0x114e): undefined reference to 
> `gdk_window_shape_combine_region'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::ResetClipRegion()':
> gtkframe.cxx:(.text+0x1174): undefined reference to 
> `gdk_window_shape_combine_region'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::Beep(unsigned short)':
> gtkframe.cxx:(.text+0x120e): undefined reference to `gdk_display_beep'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::Sync()':
> gtkframe.cxx:(.text+0x1489): undefined reference to `gdk_display_sync'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::ToTop(unsigned short)':
> gtkframe.cxx:(.text+0x16f6): undefined reference to `gtk_widget_grab_focus'
> gtkframe.cxx:(.text+0x1747): undefined reference to `gtk_window_present'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::moveWindow(long, long)':
> gtkframe.cxx:(.text+0x28e8): undefined reference to `gtk_fixed_move'
> gtkframe.cxx:(.text+0x292e): undefined reference to `gtk_window_move'
> /local/libreoffice/gitrepro/libreoffice1/libo/solver/350/unxlngx6.pro/workdir/CxxObject/vcl/unx/gtk/window/gtkframe.o:
>  
> In function `GtkSalFrame::resizeWindow(long, long)':
> gtkframe.cxx:(.text+0x2996): undefined reference to `gtk_window_resize'
> gtkframe.cxx:(.text+0x29aa): undefined reference to 
> `gtk_widget_set_size_reques

Re: [Libreoffice] Mac OS 10.4 Support

2011-07-22 Thread Marc-André Laverdière
+1
Support doesn't come free. If there is a real need for it, then we can
reverse decision any time... Git is there for such things :)

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/22/2011 03:42 PM, Michael Meeks wrote:
> Hi Joe,
> 
> On Thu, 2011-07-21 at 20:21 -0700, Joseph Powers wrote:
>> Just doing a little research and wanted to report my findings:
> 
>   Wow - what a nice write-up; we have similar problems on Linux deciding
> what versions of what underlying infrastructure to support and/or when
> to axe it.
> 
>   It sounds like 3.5 is a good place to make a platform cut for some of
> this stuff to make our lives easier.
> 
>   I'd love an ack from Norbert / Christian - to make a final decision, or
> if it is truly controversial we can discuss it at the TSC meeting next
> week.
> 
>   ATB,
> 
>   Michael.
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] patch for make to help in gbuild debugging

2011-07-05 Thread Marc-André Laverdière

+1

As a n00b, I'd like to encourage everyone to make things "just work" for 
the next me. I nearly gave up so many times that removing all roadblocks 
is really important.


So, in short: upstream upstream upstream!

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 06/30/2011 12:54 PM, Thorsten Behrens wrote:

Lubos Lunak wrote:

Also: This does not even have to be done intentionally -- some
performance hack might very well also accidentally fix an build
breaker.


  The world is not perfect. I think we all know. What is your point?


That the world is not perfect, and certain setups favour certain
moves.

But I think we're starting to talk past each other. Let's not waste
more time on this, until there's more than just idle thoughts on
either side.

Cheers,

-- Thorsten



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] java 7

2011-07-05 Thread Marc-André Laverdière

I guess we're too short of volunteers right now to have a better strategy :)

So wait and see it is!

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/06/2011 11:30 AM, Jonathan Aquilina wrote:


On 06/07/2011 07:54, Marc-André Laverdière wrote:

Hello Jonathan,

I asked a similar question before. LO will keep supporting Java for
UNO (extensions) for sure.
Right now, LO doesn't bundle a JVM, and I think it will remain like
that :) So whichever JVM the user uses will be invoked to run whatever
code is needed.

There might be some incompatibilities between Java 7 and previous
versions that may cause some bugs. I hope not, sincerely.

I haven't heard of a Java 7 testing plan in place though. Maybe you
could initiate one?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/01/2011 09:06 PM, Jonathan Aquilina wrote:

I got an email form oracle that java 7 is due out in july Is that goign
to affect anything in regards to LO?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Marc-Andre

Currently im working on another aspect of LO development which is taking
up my time currently. If I am not mistaken for the most part when new
versions of java are released, they try to keep it as backwards
compatible as possible, granted some methods or classes might become
obsolete. Maybe once java7 goes live ill do some testing and see how
badly things break.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] java 7

2011-07-05 Thread Marc-André Laverdière

Hello Jonathan,

I asked a similar question before. LO will keep supporting Java for UNO 
(extensions) for sure.
Right now, LO doesn't bundle a JVM, and I think it will remain like that 
:) So whichever JVM the user uses will be invoked to run whatever code 
is needed.


There might be some incompatibilities between Java 7 and previous 
versions that may cause some bugs. I hope not, sincerely.


I haven't heard of a Java 7 testing plan in place though. Maybe you 
could initiate one?


Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 07/01/2011 09:06 PM, Jonathan Aquilina wrote:

I got an email form oracle that java 7 is due out in july Is that goign
to affect anything in regards to LO?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Two-stage install on Windows

2011-07-04 Thread Marc-André Laverdière

Nice suggestion! Have you tried a proof of concept?

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 06/30/2011 03:34 PM, Andras Timar wrote:

Hi,

I was working on https://bugs.freedesktop.org/show_bug.cgi?id=32335
(Under Traditional Chinese environment, the installation process
showed bizarre characters) which is still unresolved but at least I
learned that the problem was not in LibreOffice source but in the
official build environment. Anyway, I started to think about why we
use two-stage install on Windows. Why don't we simply extract the MSI
installer (e.g. with NSIS silent install) to a temp folder and start
setup.exe without a -lang switch. setup.exe can find out the correct
language itself. We could get rid of NSIS limitations (non-Unicode),
and we would not put installer files to the average user's desktop.
Systems administrators can still extract the MSI installer with the
/EXTRACTONLY=ON switch of NSIS.

Do you have arguments for the current two-stage install method?

Andras
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Unable to pull

2011-06-29 Thread Marc-André Laverdière

Yes, I was able to pull from a fresh clone.

Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 06/29/2011 04:38 PM, Thorsten Behrens wrote:

Marc-André Laverdière wrote:

I've been unable to pull base. This is what I am getting:


Is that persisting? Does a fresh clone work?

Cheers,

-- Thorsten



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Unable to pull

2011-06-22 Thread Marc-André Laverdière

Hello everyone,

I've been unable to pull base. This is what I am getting:

~/libreoffice/bootstrap/clone/base$ git pull -r
error: Unable to find c5a87fa8d45112b9e7c9df773104aeaa13392b14 under 
http://anongit.freedesktop.org/git/libreoffice/base.git

Cannot obtain needed commit c5a87fa8d45112b9e7c9df773104aeaa13392b14
while processing commit 9eff2f355be364babe6b838164edb178df1799a6.
error: Fetch failed.

Is it happening to others as well? I am using git version 1.7.5.4
on Fedora 15.

--
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Making our Own Banned.h

2011-06-20 Thread Marc-André Laverdière

Hello,

That's a good question. I'm in the "don't code it if you don't have to" 
school of thought, so I'm not too hot in implementing those...
Is there a way to detect if our platform has it and use it. And if our 
platform doesn't have it, define some macro that would have a 
functionally identical code? I'm guessing the performance would be a 
little lower in those cases, but there is no point reinventing the 
wheel, no?


If we feel like implementing something, I'm suggesting ISO/IEC TR 24731. 
This looked like the best API for avoiding buffer overflows.


It is implemented by Microsoft, but sadly it seems like we don't have it 
in glibc



Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India

On 06/20/2011 11:57 AM, Robert Nagy wrote:

Hey,

Oh I just love this code, but are we actually planning on using
the size-bounded string functions like strlcpy(3)?
Because then you have to consider that these are not part of glibc
so we will have to ship our own version which is not a big deal at all
It would be a huge effort to switch all of the code to use these functions,
but I think it would worth it.

On (2011-06-20 09:51), Marc-André Laverdičre wrote:

Hello list.

As you all know, there are a bunch of old C APIs that make security
vulnerabilities trivial to implement. And doing a git grep tells me
that we use those a plenty.

Now, not all of it may create vulnerabilities, but it is good
practice to migrate away from those as much as possible.

Microsoft has compiled a useful list:
http://msdn.microsoft.com/en-us/library/bb288454.aspx

And they have made a header (I'm attaching here) that works on their
compiler.

Now, I think we should make it multi-platform, so that the whole
code base can benefit from it. The transition must be gradual, for
sure, but I think we'd benefit a lot from it in the long run.

What are the compilers that we must handle?
  - Gcc TODO
  - Microsoft's DONE
  - Sun's cc family ???
  - Intel's ???

Regards,

--
Marc-André Laverdičre
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India



/***
* banned.h - list of Microsoft Security Development Lifecycle (SDL) banned APIs
*
* Purpose:
*   This include file contains a list of banned APIs which should not be 
used in new code and
*   removed from legacy code over time.
*
* History
* 01-Jan-2006 - mikehow - Initial Version
* 22-Apr-2008 - mikehow - Updated to SDL 4.1, commented out recommendations and 
added memcpy
* 26-Jan-2009 - mikehow - Updated to SDL 5.0, made the list sane, added SDL 
compliance levels
* 10-Feb-2009 - mikehow - Updated based on feedback from MS Office
* 12-May-2009 - jpardue - Added wmemcpy
* 08-Jul-2009 - mikehow - Fixed header #ifndef/#endif logic, made the SDL 
recommended compliance level name more obvious
* 05-Nov-2009 - mikehow - Added vsnprintf (ANSI version of _vsnprintf)
* 01-Jan-2010 - mikehow - Added better strsafe integration, now the following 
works:
*   #include "strsafe.h"
*   #include "banned.h"
* 04-Jun-2010 - mikehow - Small "#if" bug fix
*   
*
***/

#ifndef _INC_BANNED
#   define _INC_BANNED

#   if defined(_MSC_VER)
#   pragma once

// SDL 5.0 and later Requirements
#   if defined(_STRSAFE_H_INCLUDED_)&&  
!defined(STRSAFE_NO_DEPRECATE)

// Only deprecate what's not already deprecated by 
StrSafe
#   pragma deprecated (_mbscpy, _mbccpy)
#   pragma deprecated (strcatA, strcatW, _mbscat, 
StrCatBuff, StrCatBuffA, StrCatBuffW, StrCatChainW, _tccat, _mbccat)
#   pragma deprecated (strncpy, wcsncpy, _tcsncpy, 
_mbsncpy, _mbsnbcpy, StrCpyN, StrCpyNA, StrCpyNW, StrNCpy, strcpynA, StrNCpyA, 
StrNCpyW, lstrcpyn, lstrcpynA, lstrcpynW)
#   pragma deprecated (strncat, wcsncat, _tcsncat, 
_mbsncat, _mbsnbcat, lstrncat, lstrcatnA, lstrcatnW, lstrcatn)
#   pragma deprecated (IsBadWritePtr, IsBadHugeWritePtr, 
IsBadReadPtr, IsBadHugeReadPtr, IsBadCodePtr, IsBadStringPtr)
#   pragma deprecated (memcpy, RtlCopyMemory, CopyMemory, 
wmemcpy)

#   else
// StrSafe not loaded, so deprecate everything!
#   pragma deprecated (strcpy, strcpyA, strcpyW, wcscpy, 
_tcscpy, _mbscpy, StrCpy, StrCpyA, StrCpyW, lstrcpy, lstrcpyA, lstrcpyW, 
_tccpy, _mbccpy, _ftcscpy)
#   pragma deprecated (strcat, strcatA, strcatW, wcscat, 
_tcscat, _mbscat, StrCat, StrCatA, StrCatW, lstrcat, lstrcatA, lstrcatW, 
StrCatBuff, StrCatBuffA, StrCatBuffW, StrCatChainW, _tccat, _mbccat, _ftcscat)
#

[Libreoffice] Making our Own Banned.h

2011-06-19 Thread Marc-André Laverdière

Hello list.

As you all know, there are a bunch of old C APIs that make security 
vulnerabilities trivial to implement. And doing a git grep tells me that 
we use those a plenty.


Now, not all of it may create vulnerabilities, but it is good practice 
to migrate away from those as much as possible.


Microsoft has compiled a useful list:
http://msdn.microsoft.com/en-us/library/bb288454.aspx

And they have made a header (I'm attaching here) that works on their 
compiler.


Now, I think we should make it multi-platform, so that the whole code 
base can benefit from it. The transition must be gradual, for sure, but 
I think we'd benefit a lot from it in the long run.


What are the compilers that we must handle?
 - Gcc TODO
 - Microsoft's DONE
 - Sun's cc family ???
 - Intel's ???

Regards,

--
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India
/***
* banned.h - list of Microsoft Security Development Lifecycle (SDL) banned APIs
*
* Purpose:
*   This include file contains a list of banned APIs which should not be 
used in new code and 
*   removed from legacy code over time.
*
* History
* 01-Jan-2006 - mikehow - Initial Version
* 22-Apr-2008 - mikehow - Updated to SDL 4.1, commented out recommendations and 
added memcpy
* 26-Jan-2009 - mikehow - Updated to SDL 5.0, made the list sane, added SDL 
compliance levels
* 10-Feb-2009 - mikehow - Updated based on feedback from MS Office
* 12-May-2009 - jpardue - Added wmemcpy
* 08-Jul-2009 - mikehow - Fixed header #ifndef/#endif logic, made the SDL 
recommended compliance level name more obvious
* 05-Nov-2009 - mikehow - Added vsnprintf (ANSI version of _vsnprintf)
* 01-Jan-2010 - mikehow - Added better strsafe integration, now the following 
works:
*   #include "strsafe.h"
*   #include "banned.h"
* 04-Jun-2010 - mikehow - Small "#if" bug fix
*  
*
***/

#ifndef _INC_BANNED
#   define _INC_BANNED

#   if defined(_MSC_VER)
#   pragma once

// SDL 5.0 and later Requirements
#   if defined(_STRSAFE_H_INCLUDED_) && 
!defined(STRSAFE_NO_DEPRECATE)

// Only deprecate what's not already deprecated by 
StrSafe
#   pragma deprecated (_mbscpy, _mbccpy)
#   pragma deprecated (strcatA, strcatW, _mbscat, 
StrCatBuff, StrCatBuffA, StrCatBuffW, StrCatChainW, _tccat, _mbccat)
#   pragma deprecated (strncpy, wcsncpy, _tcsncpy, 
_mbsncpy, _mbsnbcpy, StrCpyN, StrCpyNA, StrCpyNW, StrNCpy, strcpynA, StrNCpyA, 
StrNCpyW, lstrcpyn, lstrcpynA, lstrcpynW)
#   pragma deprecated (strncat, wcsncat, _tcsncat, 
_mbsncat, _mbsnbcat, lstrncat, lstrcatnA, lstrcatnW, lstrcatn)
#   pragma deprecated (IsBadWritePtr, IsBadHugeWritePtr, 
IsBadReadPtr, IsBadHugeReadPtr, IsBadCodePtr, IsBadStringPtr)
#   pragma deprecated (memcpy, RtlCopyMemory, CopyMemory, 
wmemcpy)

#   else
// StrSafe not loaded, so deprecate everything!
#   pragma deprecated (strcpy, strcpyA, strcpyW, wcscpy, 
_tcscpy, _mbscpy, StrCpy, StrCpyA, StrCpyW, lstrcpy, lstrcpyA, lstrcpyW, 
_tccpy, _mbccpy, _ftcscpy)
#   pragma deprecated (strcat, strcatA, strcatW, wcscat, 
_tcscat, _mbscat, StrCat, StrCatA, StrCatW, lstrcat, lstrcatA, lstrcatW, 
StrCatBuff, StrCatBuffA, StrCatBuffW, StrCatChainW, _tccat, _mbccat, _ftcscat)
#   pragma deprecated (sprintfW, sprintfA, wsprintf, 
wsprintfW, wsprintfA, sprintf, swprintf, _stprintf)
#   pragma deprecated (wvsprintf, wvsprintfA, wvsprintfW, 
vsprintf, _vstprintf, vswprintf)
#   pragma deprecated (strncpy, wcsncpy, _tcsncpy, 
_mbsncpy, _mbsnbcpy, StrCpyN, StrCpyNA, StrCpyNW, StrNCpy, strcpynA, StrNCpyA, 
StrNCpyW, lstrcpyn, lstrcpynA, lstrcpynW)
#   pragma deprecated (strncat, wcsncat, _tcsncat, 
_mbsncat, _mbsnbcat, StrCatN, StrCatNA, StrCatNW, StrNCat, StrNCatA, StrNCatW, 
lstrncat, lstrcatnA, lstrcatnW, lstrcatn)
#   pragma deprecated (gets, _getts, _gettws)
#   pragma deprecated (IsBadWritePtr, IsBadHugeWritePtr, 
IsBadReadPtr, IsBadHugeReadPtr, IsBadCodePtr, IsBadStringPtr)
#   pragma deprecated (memcpy, RtlCopyMemory, CopyMemory, 
wmemcpy)
#   endif //defined(_STRSAFE_H_INCLUDED_) && 
!defined(STRSAFE_NO_DEPRECATE)

// SDL 5.0 and later Recommendations
#   if defined(_SDL_BANNED_RECOMMENDED)
#   if defined(_STRSAFE_H_INCLUDED_) && 
!defined(STRSAFE_NO_DEPRECATE)
// Only deprecate what's not already deprec