Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

bus error on solaris in base64_decode() #1

Closed
GoogleCodeExporter opened this issue May 24, 2015 · 15 comments
Closed

bus error on solaris in base64_decode() #1

GoogleCodeExporter opened this issue May 24, 2015 · 15 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. build on sparc (i suppose any platform that doesn't forgive unaligned writes)
2. run speedtest
3. you'll get bus error on decode test (the second line)

> What version of the product are you using? On what operating system?
$ uname -a
SunOS [] 5.10 Generic_118833-24 sun4v sparc SUNW,Sun-Fire-T200

my guess this happens because of unaligned write in modp_b64.c line 152
specificaly this fragment worries me:
        *destInt = x << 8;
        p += 3;
        destInt = (uint32_t*)p;

(here at some point you'll have uint32_t* pointing to p + 3, p + 6, etc.) and 
bang.

Original issue reported on code.google.com by anton.po...@gmail.com on 21 Jun 2007 at 3:35

@GoogleCodeExporter
Copy link
Author

i use stringencoders-v3.3.0

Original comment by anton.po...@gmail.com on 21 Jun 2007 at 3:36

@GoogleCodeExporter
Copy link
Author

fix seems to be trivial, here is a patch for the place i mentioned.
(surely it's not the cleanest fix possible, and i think it'll hurt performance)
please see the attached file for .patch.

thanks for great lib :)

Original comment by anton.po...@gmail.com on 21 Jun 2007 at 3:57

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi everyone.  I just saw this.  For some reason googlecode isn't sending me the 
emails.
Let me review ASAP.  Sorry for the delay.

thanks!

Original comment by nickgsup...@gmail.com on 27 Jun 2007 at 2:11

@GoogleCodeExporter
Copy link
Author

Hi there,

If you could post your "config.h" file here, we can make an ifdef for solaris 
for
your patch.

thanks!

--nickg

Original comment by nickgsup...@gmail.com on 1 Jul 2007 at 2:30

@GoogleCodeExporter
Copy link
Author

sorry, can't do that, the machine i tested on was given to us for tests only 
and already taken away
 :(
i've no other solaris machines around (luckily :) )

Original comment by anton.po...@gmail.com on 1 Jul 2007 at 2:54

@GoogleCodeExporter
Copy link
Author

[deleted comment]

8 similar comments
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

solaris sucks deep on this, might patch solaris... because that's unacceptable 
8-), unaligned yes but still a size it's a size not variable geometry or I can 
trash many of my line of code written since 20 years or indeed... (known 
behavior), 

the interesting point here, is the COMPILER version please, can you provide 
this information might be reproducible on other hosts, and VC compiler on 
Windows might have exactly the same "issue" (if you can call that an issue, I 
would name that a choice), the trick would be a vector of ints, or even more 
dirty wrapping the thing into an packed struct 8-) cheers! I let you, then, I 
am going to whip myself repeating bad platform! bad unaligned mind! 8-D have a 
good day!

Original comment by 0xcafef...@gmail.com on 1 Jun 2011 at 5:13

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant