Re: Help w/ bt

2020-12-03 Thread Peter Kovacs

good Job :)

On 03.12.20 18:08, Jim Jagielski wrote:

fixed: it was a strcpy overflow.


On Dec 2, 2020, at 9:02 PM, Damjan Jovanovic  wrote:

That's in main/soltools.

Try isolate the exact command used, and try run that problematic
makedeepend binary in a debugger with the same args. 4 = SIGILL, a bad
sign, possibly a buffer overflow because the absolute filesystem path to
AOO is too long, or other such.

On Wed, Dec 2, 2020 at 9:31 PM Jim Jagielski mailto:j...@jagunet.com>> wrote:


Building --enable-debug is causing a weird issue...

../unxmaccx.pro/bin/makedepend: error:  got signal 4
dmake:  Error code 1, while making '../unxmaccx.pro/obj/checkdll.obj'
dmake:  '../unxmaccx.pro/obj/checkdll.obj' removed.

I'm not sure if this is macOS specific or whether or not doing so breaks
on other platforms as well... anyone know before I spin up another VM and
test?


On Dec 2, 2020, at 10:25 AM, Damjan Jovanovic  wrote:

On Wed, Dec 2, 2020 at 3:35 PM Jim Jagielski mailto:j...@jagunet.com> 
j...@jagunet.com>> wrote:

So I've been working on some of the macOS bugz and am looking at the UNO
bridge as a likely subject, hence the various changes to the macOS code
there. I'm hoping someone can help me with this crash.

I open up Extension Manager, hit check for updates and AOO immediately
dies, with the following bt. Any ideas?

Thread 5 Crashed:
0   libobjc.A.dylib 0x7fff6d7c381d objc_msgSend

+

29
1   libvcl.dylib0x0001046a400f


DragSource::initialize(com::sun::star::uno::Sequence

const&) + 175
2   libuno_cppuhelpers5abi.dylib0x00010308b1a0


cppu::OSingleFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence

const&,
com::sun::star::uno::Reference
const&) + 128
3   libuno_cppuhelpers5abi.dylib0x00010308bffd


cppu::OFactoryComponentHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence

const&,
com::sun::star::uno::Reference
const&) + 77
4   libuno_cppuhelpers5abi.dylib0x00010308c102 non-virtual
thunk to


cppu::OFactoryComponentHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence

const&,
com::sun::star::uno::Reference
const&) + 18
5   libuno_cppuhelpers5abi.dylib0x00010308da68


cppu::ORegistryFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence

const&,
com::sun::star::uno::Reference
const&) + 56
6   libuno_cppuhelpers5abi.dylib0x00010308dc62 non-virtual
thunk to


cppu::ORegistryFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence

const&,
com::sun::star::uno::Reference
const&) + 18
7   bootstrap.uno.dylib 0x00010b9e7c8c


stoc_smgr::OServiceManager::createInstanceWithArgumentsAndContext(rtl::OUString

const&, com::sun::star::uno::Sequence const&,
com::sun::star::uno::Reference
const&) + 236
8   bootstrap.uno.dylib 0x00010b9e807f non-virtual
thunk to
stoc_smgr::OServiceManager::createInstanceWithArguments(rtl::OUString
const&, com::sun::star::uno::Sequence const&)

+ 31

9   libvcl.dylib0x00010495b4fd
Window::GetDragSource() + 813
10  libvcl.dylib0x00010495adf4
Window::GetDropTarget() + 84
11  libsvt.dylib0x000103adb2cf
DropTargetHelper::DropTargetHelper(Window*) + 63
12  libsvt.dylib0x000103992f2b
SvLBox::SvLBox(Window*, ResId const&) + 139
13  libsvt.dylib0x00010399b6f9
SvTreeListBox::SvTreeListBox(Window*, ResId const&) + 25
14  libsvxcore.dylib0x0001052392d5
SvxCheckListBox::SvxCheckListBox(Window*, ResId const&, Image const&,

Image

const&) + 21
15  libdeploymentgui.uno.dylib  0x00010320672a
dp_gui::UpdateDialog::CheckListBox::CheckListBox(dp_gui::UpdateDialog&,
ResId const&, Image const&, Image const&) + 26
16  libdeploymentgui.uno.dylib  0x0001032035f5


dp_gui::UpdateDialog::UpdateDialog(com::sun::star::uno::Reference

const&, Window*,


std::__1::vector,
std::__1::allocator

const&, std::__1::vector
std::__1::allocator >*) + 565
17  libdeploymentgui.uno.dylib  0x000103215991


dp_gui::ExtensionCmdQueue::Thread::_checkForUpdates(std::__1::vector,
std::__1::allocator

const&) + 113

18  libdeploymentgui.uno.dylib  0x0001032145da
dp_gui::ExtensionCmdQueue::Thread::execute() + 906
19  libdeploymentgui.uno.dylib  0x0001031fffa7 non-virtual
thunk to dp_gui::Thread::run() + 23
20  libsofficeapp.dylib 0x000102e4ee9f threadFunc +

15

21  libuno_sal.dylib0x000102c22cf9 0x102c1b000 +
31993
22  libsystem_pthread.dylib 0x7fff6eb7d109

_pthread_start

+ 148
23  libsystem_pthread.dylib 0x7fff6eb78b8b thread_start

+

15




Looks like the update dialog contains a "treelistbox" which attempts to
initialize drag-and-drop, and 

Re: macOS - oldest supported version

2020-12-03 Thread Dave Fisher
Hi Jim,

> On Dec 2, 2020, at 6:42 PM, Jim Jagielski  wrote:
> 
> Up to now, we've held 10.7 as the oldest version of OS X AOO is supported on. 
> Even with 4.2.x this is still the case.
> 
> However, if we allow for 10.9 to be the "oldest", we can help include some 
> capabilities that we can't right now. For example, our support of RTTI and 
> _si_class_type_info is pretty meager on macOS, due to that only being 
> available starting w/ a 10.9 SDK and this impacts "our" full support of UNO.
> 
> So I am wondering if maybe we should, to go along w/ CentOS7 as our base 
> community builds, "upgrade" to 10.9 for our macOS ones.

I agree. We only lose a few Mac hardware versions from around 2007-2008 by 
dropping 10.7 and 10.8 support.

I found a good listing on this page:
https://jimmytechsf.com/what-system-software-can-my-mac-run/

BTW - only one model that supports 10.9 cannot be upgraded to 10.11 (A MacPro 
4,1 (Early 2009))

So, a minimum version of 10.10 is nearly the same as a minimum version of 10.9 
and it is possible to download Yosemite, but Mavericks is unavailable.

Some earlier Macs can be hacked to support 10.7, but it requires either a new 
Intel chip or more memory.

I think that 4.1.8 can be offered anyone who cannot upgrade to 10.9 or better.

> 
> Alternatively, we could produce 2 macOS packages: one for 10.8 and older and 
> one for 10.9 and newer. In fact, I even noticed that the download page still 
> has the *logic* for 2 macOS DMGs to be available...

It’s really hard to keep around a 10.7 machine to test. (At least for me.) All 
of the browsers stopped working properly on the iMac that I was holding back 
on. So, I had to upgrade our iMac8,1 to 10.11 (as far I could go.)

I have an older Mac in storage. Next time I can I’ll retrieve it to see what OS 
X is on it. I think it is 2004 era …

Regards,
Dave

> 
> Thoughts?
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Help w/ bt

2020-12-03 Thread Damjan Jovanovic
Well done!

On Thu, Dec 3, 2020 at 7:09 PM Jim Jagielski  wrote:

> fixed: it was a strcpy overflow.
>
> > On Dec 2, 2020, at 9:02 PM, Damjan Jovanovic  wrote:
> >
> > That's in main/soltools.
> >
> > Try isolate the exact command used, and try run that problematic
> > makedeepend binary in a debugger with the same args. 4 = SIGILL, a bad
> > sign, possibly a buffer overflow because the absolute filesystem path to
> > AOO is too long, or other such.
> >
> > On Wed, Dec 2, 2020 at 9:31 PM Jim Jagielski  j...@jagunet.com>> wrote:
> >
> >> Building --enable-debug is causing a weird issue...
> >>
> >> ../unxmaccx.pro/bin/makedepend: error:  got signal 4
> >> dmake:  Error code 1, while making '../unxmaccx.pro/obj/checkdll.obj'
> >> dmake:  '../unxmaccx.pro/obj/checkdll.obj' removed.
> >>
> >> I'm not sure if this is macOS specific or whether or not doing so breaks
> >> on other platforms as well... anyone know before I spin up another VM
> and
> >> test?
> >>
> >>> On Dec 2, 2020, at 10:25 AM, Damjan Jovanovic 
> wrote:
> >>>
> >>> On Wed, Dec 2, 2020 at 3:35 PM Jim Jagielski  j...@jagunet.com>  >> j...@jagunet.com>> wrote:
> >>>
>  So I've been working on some of the macOS bugz and am looking at the
> UNO
>  bridge as a likely subject, hence the various changes to the macOS
> code
>  there. I'm hoping someone can help me with this crash.
> 
>  I open up Extension Manager, hit check for updates and AOO immediately
>  dies, with the following bt. Any ideas?
> 
>  Thread 5 Crashed:
>  0   libobjc.A.dylib 0x7fff6d7c381d
> objc_msgSend
> >> +
>  29
>  1   libvcl.dylib0x0001046a400f
> 
> >>
> DragSource::initialize(com::sun::star::uno::Sequence
>  const&) + 175
>  2   libuno_cppuhelpers5abi.dylib0x00010308b1a0
> 
> >>
> cppu::OSingleFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
>  const&,
>  com::sun::star::uno::Reference
>  const&) + 128
>  3   libuno_cppuhelpers5abi.dylib0x00010308bffd
> 
> >>
> cppu::OFactoryComponentHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
>  const&,
>  com::sun::star::uno::Reference
>  const&) + 77
>  4   libuno_cppuhelpers5abi.dylib0x00010308c102 non-virtual
>  thunk to
> 
> >>
> cppu::OFactoryComponentHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
>  const&,
>  com::sun::star::uno::Reference
>  const&) + 18
>  5   libuno_cppuhelpers5abi.dylib0x00010308da68
> 
> >>
> cppu::ORegistryFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
>  const&,
>  com::sun::star::uno::Reference
>  const&) + 56
>  6   libuno_cppuhelpers5abi.dylib0x00010308dc62 non-virtual
>  thunk to
> 
> >>
> cppu::ORegistryFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
>  const&,
>  com::sun::star::uno::Reference
>  const&) + 18
>  7   bootstrap.uno.dylib 0x00010b9e7c8c
> 
> >>
> stoc_smgr::OServiceManager::createInstanceWithArgumentsAndContext(rtl::OUString
>  const&, com::sun::star::uno::Sequence
> const&,
>  com::sun::star::uno::Reference
>  const&) + 236
>  8   bootstrap.uno.dylib 0x00010b9e807f non-virtual
>  thunk to
>  stoc_smgr::OServiceManager::createInstanceWithArguments(rtl::OUString
>  const&, com::sun::star::uno::Sequence
> const&)
> >> + 31
>  9   libvcl.dylib0x00010495b4fd
>  Window::GetDragSource() + 813
>  10  libvcl.dylib0x00010495adf4
>  Window::GetDropTarget() + 84
>  11  libsvt.dylib0x000103adb2cf
>  DropTargetHelper::DropTargetHelper(Window*) + 63
>  12  libsvt.dylib0x000103992f2b
>  SvLBox::SvLBox(Window*, ResId const&) + 139
>  13  libsvt.dylib0x00010399b6f9
>  SvTreeListBox::SvTreeListBox(Window*, ResId const&) + 25
>  14  libsvxcore.dylib0x0001052392d5
>  SvxCheckListBox::SvxCheckListBox(Window*, ResId const&, Image const&,
> >> Image
>  const&) + 21
>  15  libdeploymentgui.uno.dylib  0x00010320672a
> 
> dp_gui::UpdateDialog::CheckListBox::CheckListBox(dp_gui::UpdateDialog&,
>  ResId const&, Image const&, Image const&) + 26
>  16  libdeploymentgui.uno.dylib  0x0001032035f5
> 
> >>
> dp_gui::UpdateDialog::UpdateDialog(com::sun::star::uno::Reference
>  const&, Window*,
> 
> >>
> std::__1::vector,
> 
> >>
> std::__1::allocator
> >> const&, std::__1::vector  std::__1::allocator >*) + 565
>  17  libdeploymentgui.uno.dylib  0x000103215991
> 
> >>
> 

Re: Help w/ bt

2020-12-03 Thread Jim Jagielski
Just an inline update:

> On Dec 2, 2020, at 10:25 AM, Damjan Jovanovic  wrote:
> 
> Can you drag-and-drop within AOO generally, eg. drag a file from your file
> manager into Writer?

Yeah, no problem.

> 
> The code seems to be in
> http://opengrok.openoffice.org/xref/trunk/main/vcl/aqua/source/dtrans/DragSource.cxx?r=9f62ea84#183
> 

I've checked and the last Devm2 build didn't have this issue... the main diffs 
are the upgrade to APR and, interestingly, a patch file added to the serf 
build... I'm pulling out the NULL patch from serf to see if that may be a 
trigger.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Help w/ bt

2020-12-03 Thread Jim Jagielski
fixed: it was a strcpy overflow.

> On Dec 2, 2020, at 9:02 PM, Damjan Jovanovic  wrote:
> 
> That's in main/soltools.
> 
> Try isolate the exact command used, and try run that problematic
> makedeepend binary in a debugger with the same args. 4 = SIGILL, a bad
> sign, possibly a buffer overflow because the absolute filesystem path to
> AOO is too long, or other such.
> 
> On Wed, Dec 2, 2020 at 9:31 PM Jim Jagielski  > wrote:
> 
>> Building --enable-debug is causing a weird issue...
>> 
>> ../unxmaccx.pro/bin/makedepend: error:  got signal 4
>> dmake:  Error code 1, while making '../unxmaccx.pro/obj/checkdll.obj'
>> dmake:  '../unxmaccx.pro/obj/checkdll.obj' removed.
>> 
>> I'm not sure if this is macOS specific or whether or not doing so breaks
>> on other platforms as well... anyone know before I spin up another VM and
>> test?
>> 
>>> On Dec 2, 2020, at 10:25 AM, Damjan Jovanovic  wrote:
>>> 
>>> On Wed, Dec 2, 2020 at 3:35 PM Jim Jagielski >>  > j...@jagunet.com>> wrote:
>>> 
 So I've been working on some of the macOS bugz and am looking at the UNO
 bridge as a likely subject, hence the various changes to the macOS code
 there. I'm hoping someone can help me with this crash.
 
 I open up Extension Manager, hit check for updates and AOO immediately
 dies, with the following bt. Any ideas?
 
 Thread 5 Crashed:
 0   libobjc.A.dylib 0x7fff6d7c381d objc_msgSend
>> +
 29
 1   libvcl.dylib0x0001046a400f
 
>> DragSource::initialize(com::sun::star::uno::Sequence
 const&) + 175
 2   libuno_cppuhelpers5abi.dylib0x00010308b1a0
 
>> cppu::OSingleFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
 const&,
 com::sun::star::uno::Reference
 const&) + 128
 3   libuno_cppuhelpers5abi.dylib0x00010308bffd
 
>> cppu::OFactoryComponentHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
 const&,
 com::sun::star::uno::Reference
 const&) + 77
 4   libuno_cppuhelpers5abi.dylib0x00010308c102 non-virtual
 thunk to
 
>> cppu::OFactoryComponentHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
 const&,
 com::sun::star::uno::Reference
 const&) + 18
 5   libuno_cppuhelpers5abi.dylib0x00010308da68
 
>> cppu::ORegistryFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
 const&,
 com::sun::star::uno::Reference
 const&) + 56
 6   libuno_cppuhelpers5abi.dylib0x00010308dc62 non-virtual
 thunk to
 
>> cppu::ORegistryFactoryHelper::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence
 const&,
 com::sun::star::uno::Reference
 const&) + 18
 7   bootstrap.uno.dylib 0x00010b9e7c8c
 
>> stoc_smgr::OServiceManager::createInstanceWithArgumentsAndContext(rtl::OUString
 const&, com::sun::star::uno::Sequence const&,
 com::sun::star::uno::Reference
 const&) + 236
 8   bootstrap.uno.dylib 0x00010b9e807f non-virtual
 thunk to
 stoc_smgr::OServiceManager::createInstanceWithArguments(rtl::OUString
 const&, com::sun::star::uno::Sequence const&)
>> + 31
 9   libvcl.dylib0x00010495b4fd
 Window::GetDragSource() + 813
 10  libvcl.dylib0x00010495adf4
 Window::GetDropTarget() + 84
 11  libsvt.dylib0x000103adb2cf
 DropTargetHelper::DropTargetHelper(Window*) + 63
 12  libsvt.dylib0x000103992f2b
 SvLBox::SvLBox(Window*, ResId const&) + 139
 13  libsvt.dylib0x00010399b6f9
 SvTreeListBox::SvTreeListBox(Window*, ResId const&) + 25
 14  libsvxcore.dylib0x0001052392d5
 SvxCheckListBox::SvxCheckListBox(Window*, ResId const&, Image const&,
>> Image
 const&) + 21
 15  libdeploymentgui.uno.dylib  0x00010320672a
 dp_gui::UpdateDialog::CheckListBox::CheckListBox(dp_gui::UpdateDialog&,
 ResId const&, Image const&, Image const&) + 26
 16  libdeploymentgui.uno.dylib  0x0001032035f5
 
>> dp_gui::UpdateDialog::UpdateDialog(com::sun::star::uno::Reference
 const&, Window*,
 
>> std::__1::vector,
 
>> std::__1::allocator
>> const&, std::__1::vector>>> std::__1::allocator >*) + 565
 17  libdeploymentgui.uno.dylib  0x000103215991
 
>> dp_gui::ExtensionCmdQueue::Thread::_checkForUpdates(std::__1::vector,
 
>> std::__1::allocator
>> const&) + 113
 18  libdeploymentgui.uno.dylib  0x0001032145da
 dp_gui::ExtensionCmdQueue::Thread::execute() + 906
 19  libdeploymentgui.uno.dylib  0x0001031fffa7 non-virtual
 thunk to dp_gui::Thread::run() 

Re: [openoffice] branch trunk updated: Use of strcpy is problematic esp when we don't check bounds. Ugg. Instead use memmove(); Increase buffer sizes due to larger requirements.

2020-12-03 Thread Jim Jagielski



> On Dec 3, 2020, at 10:34 AM, Dave Fisher  wrote:
>> index f27a04e..5f60f73 100644
>> --- a/main/soltools/mkdepend/parse.c
>> +++ b/main/soltools/mkdepend/parse.c
>> @@ -346,7 +346,11 @@ int deftype (line, filep, file_red, file, parse_it, 
>> symbols)
>>   /*
>>* copy the definition back to the beginning of the line.
>>*/
>> -strcpy (line, p);
>> +{
>> +int len = strlen(line);
>> +memmove (line, p, len);
>> +line[len] = '\0';
> 
> Shouldn’t this be:
> 
> p[len] = ‘\0’;
> 
> Or memove len+1
> 
> Regards,
> Dave


Both strcpy and memmove are (dst, src...), so we are copying from p to line. We 
want to ensure that we only copy as much as line will hold. So we look at how 
big line is, copy that many bytes from p to line and then ensure a closing NUL 
(which is a failsafe).

But upon review, we should also check for strlen(p) as well and just copy the 
smaller number of char... but the core dumps were due to p being too big.
-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [openoffice] branch trunk updated: Use of strcpy is problematic esp when we don't check bounds. Ugg. Instead use memmove(); Increase buffer sizes due to larger requirements.

2020-12-03 Thread Dave Fisher



Sent from my iPhone

> On Dec 3, 2020, at 5:43 AM, j...@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> jim pushed a commit to branch trunk
> in repository https://gitbox.apache.org/repos/asf/openoffice.git
> 
> 
> The following commit(s) were added to refs/heads/trunk by this push:
> new e932034  Use of strcpy is problematic esp when we don't check bounds. 
> Ugg. Instead use memmove(); Increase buffer sizes due to larger requirements.
> e932034 is described below
> 
> commit e932034bf45507ae970bfd7165fb7b2a983ba40d
> Author: Jim Jagielski 
> AuthorDate: Thu Dec 3 08:40:55 2020 -0500
> 
>Use of strcpy is problematic esp when we don't check bounds. Ugg. Instead 
> use memmove();
>Increase buffer sizes due to larger requirements.
> 
>(cherry picked from commit c56f8ff52acab2e8b128306b12cd162fb5915913)
> ---
> main/soltools/mkdepend/cppsetup.c | 2 +-
> main/soltools/mkdepend/def.h  | 5 +++--
> main/soltools/mkdepend/main.c | 9 +
> main/soltools/mkdepend/parse.c| 6 +-
> main/soltools/mkdepend/pr.c   | 2 +-
> 5 files changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/main/soltools/mkdepend/cppsetup.c 
> b/main/soltools/mkdepend/cppsetup.c
> index 810f6b9..131f889 100644
> --- a/main/soltools/mkdepend/cppsetup.c
> +++ b/main/soltools/mkdepend/cppsetup.c
> @@ -150,7 +150,7 @@ _my_if_errors (ip, cp, expecting)
> }
> 
> 
> -#define MAXNAMELEN 256
> +#define MAXNAMELEN 1024
> 
> char *
> _lookup_variable (var, len)
> diff --git a/main/soltools/mkdepend/def.h b/main/soltools/mkdepend/def.h
> index 1217c6c..07a5941 100644
> --- a/main/soltools/mkdepend/def.h
> +++ b/main/soltools/mkdepend/def.h
> @@ -59,11 +59,12 @@ in this Software without prior written authorization from 
> the X Consortium.
> #defineS_IFREG  010 
> #endif
> 
> -#define MAXDEFINES512
> +#define MAXDEFINES2048
> #define MAXFILES( 1<<16 ) /* Increased from 512. -mcafee */
>  /* Increased from 1024. -mh */
>  /* Increased from 2048. -b_michaelsen */
> -#define MAXDIRS64
> +#define MAXDIRS128
> +#define OURBUFSIZ ( 1<<16 )
> #define SYMHASHSEED 131  /* 131 1313 13131 ... */
> #define SYMHASHMEMBERS64/* must be 2^x to work right */
> #defineTRUE1
> diff --git a/main/soltools/mkdepend/main.c b/main/soltools/mkdepend/main.c
> index 8082214..fc9aecc 100644
> --- a/main/soltools/mkdepend/main.c
> +++ b/main/soltools/mkdepend/main.c
> @@ -140,6 +140,7 @@ catch (sig)
> int sig;
> {
>fflush (stdout);
> +abort();
>fatalerr ("got signal %d\n", sig);
> }
> 
> @@ -659,8 +660,8 @@ void redirect(line, makefile)
> {
>struct statst;
>FILE*fdin, *fdout;
> -charbackup[ BUFSIZ ],
> -buf[ BUFSIZ ];
> +charbackup[ OURBUFSIZ ],
> +buf[ OURBUFSIZ ];
>booleanfound = FALSE;
>intlen;
> 
> @@ -699,7 +700,7 @@ void redirect(line, makefile)
>if ((fdout = freopen(makefile, "w", stdout)) == NULL)
>fatalerr("cannot open \"%s\"\n", backup);
>len = strlen(line);
> -while (!found && fgets(buf, BUFSIZ, fdin)) {
> +while (!found && fgets(buf, OURBUFSIZ, fdin)) {
>if (*buf == '#' && strncmp(line, buf, len) == 0)
>found = TRUE;
>fputs(buf, fdout);
> @@ -710,7 +711,7 @@ void redirect(line, makefile)
>line);
>puts(line); /* same as fputs(fdout); but with newline */
>} else if (append) {
> -while (fgets(buf, BUFSIZ, fdin)) {
> +while (fgets(buf, OURBUFSIZ, fdin)) {
>fputs(buf, fdout);
>}
>}
> diff --git a/main/soltools/mkdepend/parse.c b/main/soltools/mkdepend/parse.c
> index f27a04e..5f60f73 100644
> --- a/main/soltools/mkdepend/parse.c
> +++ b/main/soltools/mkdepend/parse.c
> @@ -346,7 +346,11 @@ int deftype (line, filep, file_red, file, parse_it, 
> symbols)
>/*
> * copy the definition back to the beginning of the line.
> */
> -strcpy (line, p);
> +{
> +int len = strlen(line);
> +memmove (line, p, len);
> +line[len] = '\0';

Shouldn’t this be:

p[len] = ‘\0’;

Or memove len+1

Regards,
Dave

> +}
>break;
>case ELSE:
>case ENDIF:
> diff --git a/main/soltools/mkdepend/pr.c b/main/soltools/mkdepend/pr.c
> index 2c4731e..ac0f994 100644
> --- a/main/soltools/mkdepend/pr.c
> +++ b/main/soltools/mkdepend/pr.c
> @@ -107,7 +107,7 @@ void pr(ip, file, base)
>static char*lastfile;
>static intcurrent_len;
>register intlen, i;
> -charbuf[ BUFSIZ ];
> +charbuf[ OURBUFSIZ ];
> 
>printed = TRUE;
>len = strlen(ip->i_file)+1;
> 


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



macOS - oldest supported version

2020-12-03 Thread Jim Jagielski
Up to now, we've held 10.7 as the oldest version of OS X AOO is supported on. 
Even with 4.2.x this is still the case.

However, if we allow for 10.9 to be the "oldest", we can help include some 
capabilities that we can't right now. For example, our support of RTTI and 
_si_class_type_info is pretty meager on macOS, due to that only being available 
starting w/ a 10.9 SDK and this impacts "our" full support of UNO.

So I am wondering if maybe we should, to go along w/ CentOS7 as our base 
community builds, "upgrade" to 10.9 for our macOS ones.

Alternatively, we could produce 2 macOS packages: one for 10.8 and older and 
one for 10.9 and newer. In fact, I even noticed that the download page still 
has the *logic* for 2 macOS DMGs to be available...

Thoughts?
-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [openoffice] branch trunk updated: Huge updates to macOS UNO bridges, based on FreeBSD and Linux.

2020-12-03 Thread Peter Kovacs

How about we change the Linux and FreeBSD Code to the C++ static cast?

I think we should move away from C Code and only use it where we must 
use it.


On 02.12.20 04:30, Jim Jagielski wrote:




On Dec 1, 2020, at 6:16 PM, Don Lewis  wrote:

On  1 Dec, j...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.

jim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
 new d73dd1d  Huge updates to macOS UNO bridges, based on FreeBSD and Linux.
d73dd1d is described below

commit d73dd1d32e12ca3b96b7bbfff854b742992ff915
Author: Jim Jagielski 
AuthorDate: Tue Dec 1 16:59:54 2020 -0500

Huge updates to macOS UNO bridges, based on FreeBSD and Linux.

diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx 
b/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
index 7902bd9..bfe18db 100644
--- a/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
+++ b/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
@@ -187,7 +187,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr ) SAL_THR
 type_info * base_rtti = getRTTI(
 (typelib_CompoundTypeDescription 
*)pTypeDescr->pBaseTypeDescription );
 rtti = new __si_class_type_info(
-strdup( rttiName ), static_cast<__class_type_info 
*>(base_rtti) );
+strdup( rttiName ), (__class_type_info *)base_rtti );
 }
 else
 {

What is the reason for this change?  static_cast is the more correct C++
way as opposed to a C-style cast.


Part of a merge from the code in the FreeBSD and Linux files...
-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [openoffice] branch trunk updated: Huge updates to macOS UNO bridges, based on FreeBSD and Linux.

2020-12-03 Thread Matthias Seidel
Hi all,

I am sure this is only a small syntax error, but the Windows build
breaks constantly...

Any ideas?

Matthias

Am 02.12.20 um 21:50 schrieb Matthias Seidel:
>
> Hi Jim,
>
> Windows buildbot breaks now in module bridges:
>
> ...
> component.cxx
> e:/slave14/openoffice-win7/build/main/bridges/source/cpp_uno/shared/component.cxx(58)
>  : error C2059: syntax error : '['
> e:/slave14/openoffice-win7/build/main/bridges/source/cpp_uno/shared/component.cxx(58)
>  : error C2143: syntax error : missing ';' before '{'
> e:/slave14/openoffice-win7/build/main/bridges/source/cpp_uno/shared/component.cxx(68)
>  : warning C4172: returning address of local variable or temporary
> e:/slave14/openoffice-win7/build/main/bridges/source/cpp_uno/shared/component.cxx(69)
>  : error C2059: syntax error : ')'
> ...
>
> For more details see:
>
> https://ci.apache.org/projects/openoffice/buildlogs/win/main/bridges/wntmsci12.pro/misc/logs/prj.txt
>
> Regards,
>
>    Matthias
>
> Am 01.12.20 um 23:01 schrieb j...@apache.org:
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> jim pushed a commit to branch trunk
>> in repository https://gitbox.apache.org/repos/asf/openoffice.git
>>
>>
>> The following commit(s) were added to refs/heads/trunk by this push:
>>  new d73dd1d  Huge updates to macOS UNO bridges, based on FreeBSD and 
>> Linux.
>> d73dd1d is described below
>>
>> commit d73dd1d32e12ca3b96b7bbfff854b742992ff915
>> Author: Jim Jagielski 
>> AuthorDate: Tue Dec 1 16:59:54 2020 -0500
>>
>> Huge updates to macOS UNO bridges, based on FreeBSD and Linux.
>> 
>> (cherry picked from commit 37f4cb171557a563bb797a6166dd60f907b367f2)
>> ---
>>  .../inc/bridges/cpp_uno/shared/vtablefactory.hxx   |   2 +-
>>  .../source/cpp_uno/gcc3_freebsd_x86-64/except.cxx  |   2 +-
>>  .../source/cpp_uno/s5abi_macosx_x86-64/call.s  | 120 
>> +
>>  .../source/cpp_uno/s5abi_macosx_x86-64/cpp2uno.cxx |  68 ++--
>>  .../source/cpp_uno/s5abi_macosx_x86-64/except.cxx  |   9 +-
>>  .../source/cpp_uno/s5abi_macosx_x86-64/makefile.mk |   6 +-
>>  .../source/cpp_uno/s5abi_macosx_x86-64/share.hxx   |   8 +-
>>  .../source/cpp_uno/s5abi_macosx_x86-64/uno2cpp.cxx |   5 +-
>>  main/bridges/source/cpp_uno/shared/component.cxx   |  44 +++-
>>  .../source/cpp_uno/shared/vtablefactory.cxx|   8 +-
>>  main/vcl/aqua/source/app/salinst.cxx   |  10 +-
>>  11 files changed, 169 insertions(+), 113 deletions(-)
>>
>> diff --git a/main/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx 
>> b/main/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
>> index 3fe88e5..dc15fb5 100644
>> --- a/main/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
>> +++ b/main/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx
>> @@ -33,7 +33,7 @@
>>  #include 
>>  
>>  /*See: http://people.redhat.com/drepper/selinux-mem.html*/
>> -#if defined (LINUX) || defined (FREEBSD)
>> +#if defined (LINUX) || defined (FREEBSD) || defined(MACOSX)
>>  #define USE_DOUBLE_MMAP
>>  #endif
>>  
>> diff --git a/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx 
>> b/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
>> index 7902bd9..bfe18db 100644
>> --- a/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
>> +++ b/main/bridges/source/cpp_uno/gcc3_freebsd_x86-64/except.cxx
>> @@ -187,7 +187,7 @@ type_info * RTTI::getRTTI( 
>> typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
>>  type_info * base_rtti = getRTTI(
>>  (typelib_CompoundTypeDescription 
>> *)pTypeDescr->pBaseTypeDescription );
>>  rtti = new __si_class_type_info(
>> -strdup( rttiName ), static_cast<__class_type_info 
>> *>(base_rtti) );
>> +strdup( rttiName ), (__class_type_info *)base_rtti 
>> );
>>  }
>>  else
>>  {
>> diff --git a/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s 
>> b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
>> new file mode 100644
>> index 000..4801a94
>> --- /dev/null
>> +++ b/main/bridges/source/cpp_uno/s5abi_macosx_x86-64/call.s
>> @@ -0,0 +1,120 @@
>> +/**
>> + * 
>> + * Licensed to the Apache Software Foundation (ASF) under one
>> + * or more contributor license agreements.  See the NOTICE file
>> + * distributed with this work for additional information
>> + * regarding copyright ownership.  The ASF licenses this file
>> + * to you under the Apache License, Version 2.0 (the
>> + * "License"); you may not use this file except in compliance
>> + * with the License.  You may obtain a copy of the License at
>> + * 
>> + *   http://www.apache.org/licenses/LICENSE-2.0
>> + * 
>> + * Unless required by applicable law or agreed to in writing,
>> + * software distributed under the License is distributed on an
>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR