Re: can not download IMAP messages with isync/mbsync

2022-11-15 Thread Mouse
> And, the wraparound seems to happen at 0x7fff instead of > 0x. Don't know ARM well enough to explain why. It's probably using a signed, instead of unsigned, conditional branch instruction. (I think for ARM it's the branch rather than the compare that differs for signed vs

Re: can not download IMAP messages with isync/mbsync

2022-11-15 Thread RVP
On Mon, 14 Nov 2022, RVP wrote: On Mon, 14 Nov 2022, Mouse wrote: My guess is that the buffer you're testing with is near the top of the address space, within ~1GB of address 0x, and what you're seeing is due to wraparound. Thanks for that analysis--address-wrapping was my first

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Mouse
>> My guess is that the buffer you're testing with is near the top of >> the address space, within ~1GB of address 0x, and what >> you're seeing is due to wraparound. > Thanks for that analysis--address-wrapping was my first guess too, > but, I didn't have the time to confirm it: the 1GB

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread RVP
On Mon, 14 Nov 2022, Mouse wrote: My guess is that the buffer you're testing with is near the top of the address space, within ~1GB of address 0x, and what you're seeing is due to wraparound. Thanks for that analysis--address-wrapping was my first guess too, but, I didn't have the

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Mouse
> Or is UINT_MAX not guaranteed to fit in size_t I _think_ there is no guarantee that UINT_MAX fits in a size_t. But, upthread, I see... > Turn out, on ARM, strnlen(3) is written in assembly and this always > returns `maxlen' for any value of `maxlen' > ~1GB. Not quite. I have a guest login

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Martin Husemann
On Mon, Nov 14, 2022 at 09:48:50AM -0500, Greg Troxel wrote: > That's why it is harder to meet the spec than it first seems. C > doesn't offer UB for such arguments, so it should be fixed. (I'm not > asking anyone to do the work - just to agree it's broken.) I am not sure it is broken, but how

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Greg Troxel
Martin Husemann writes: > On Mon, Nov 14, 2022 at 08:17:32AM -0500, Greg Troxel wrote: >> I am not arguing against fixing the code to be sane. I am just raising >> the other question about maybe strnlen needs fixing. > > "s + maxlen" (for most s) wraps around on 32bit architectures so the >

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Martin Husemann
On Mon, Nov 14, 2022 at 08:17:32AM -0500, Greg Troxel wrote: > I am not arguing against fixing the code to be sane. I am just raising > the other question about maybe strnlen needs fixing. "s + maxlen" (for most s) wraps around on 32bit architectures so the typical implementation will notice

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Greg Troxel
Martin Husemann writes: > On Mon, Nov 14, 2022 at 01:22:54PM +0100, Marko Bauhardt wrote: >> I configured to not use the system strnlen as you suggested. this works fine. >> i'm able to fetch my mails. >> THX!! > > The patch is the better solution, the length passed to strnlen is > obviously

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Martin Husemann
On Mon, Nov 14, 2022 at 01:22:54PM +0100, Marko Bauhardt wrote: > I configured to not use the system strnlen as you suggested. this works fine. > i'm able to fetch my mails. > THX!! The patch is the better solution, the length passed to strnlen is obviously bogus. Martin

Re: can not download IMAP messages with isync/mbsync

2022-11-14 Thread Marko Bauhardt
> RVP hat am 14.11.2022 08:46 CET geschrieben: hey rvp you are the greatest! awesome. > ...Turn out, on ARM, strnlen(3) is written in assembly > and this always returns `maxlen' for any value of `maxlen' > ~1GB. > The fix > is either: > > a) Configure isync-1.4.4 to _not_ use the system

Re: can not download IMAP messages with isync/mbsync

2022-11-13 Thread RVP
On Mon, 7 Nov 2022, RVP wrote: I've not been able to reproduce this at all even with 3 servers (2 providers and 1 local [dovecot +COMPRESS]) on 9.3_STABLE/amd64. OK. Once I had QEMU + NetBSD-ARMv7 running, it turned out to be an easy issue to diagnose. Turn out, on ARM, strnlen(3) is written

Re: can not download IMAP messages with isync/mbsync

2022-11-07 Thread RVP
On Sun, 6 Nov 2022, Marko Bauhardt wrote: This give me the following error while `configure` ``` configure: error: compiler does not support required C11 features ``` This shouldn't happen. Do you any custom CC, CPPFLAGS, CFLAGS, LDFLAGS set? I‘m getting ´´´ Loading far side box... F: [

Re: can not download IMAP messages with isync/mbsync

2022-11-06 Thread Marko Bauhardt
> RVP hat am 05.11.2022 08:51 CET geschrieben: > Does this occur if you compile isync with `--without-zlib'? This give me the following error while `configure` ``` configure: error: compiler does not support required C11 features ``` > Try compiling with `-fsanitize=address -g -O0' I‘m

Re: can not download IMAP messages with isync/mbsync

2022-11-05 Thread RVP
On Fri, 4 Nov 2022, Marko Bauhardt wrote: I want to use isync (mbsync) on netbsd to download my mails from my IMAP account. isync with the same configuration works fine on OSX and linux, but fails on netbsd. There is already a discussion on * https://sourceforge.net/p/isync/bugs/64/ *

can not download IMAP messages with isync/mbsync

2022-11-04 Thread Marko Bauhardt
Hey, I want to use isync (mbsync) on netbsd to download my mails from my IMAP account. isync with the same configuration works fine on OSX and linux, but fails on netbsd. There is already a discussion on * https://sourceforge.net/p/isync/bugs/64/ *