[ 
https://issues.apache.org/jira/browse/AVRO-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286862#comment-15286862
 ] 

Ryan Blue commented on AVRO-1846:
---------------------------------

[~jocoda], thanks for reporting this. It looks like the problem is happening 
while you're initializing a long data field, which is probably field 1 in 
record "event". Is that record defined by your code? I'm wondering if you could 
get around this by changing your schema so that the long fields appeared first. 
Otherwise, the solution is to add an alignment flag that inserts bytes in the 
in-memory structure, right?

> Memory alignment issue causing crash on Solaris on Sparc
> --------------------------------------------------------
>
>                 Key: AVRO-1846
>                 URL: https://issues.apache.org/jira/browse/AVRO-1846
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.8.0
>         Environment: SunOS 5.10 Generic_141444-09 sun4u sparc 
> SUNW,Sun-Fire-V240
> gcc version 4.9.0 (GCC)
>            Reporter: Joanne Dodd
>
> Excerpt of output from running process through gdb (note debug offsets on):
>  Record address
>   Header: Offset 0, size 0
>   Field 0:
>     Schema string
>     Offset 0, size 24
>   Field 1:
>     Schema string
>     Offset 24, size 24
>   Field 2:
>     Schema int
>     Offset 48, size 4
>   Field 3:
>     Schema string
>     Offset 52, size 24
>   Field 4:
>     Schema int
>     Offset 76, size 4
>   TOTAL SIZE: 80
>   Record Event
>   Header: Offset 0, size 0
>   Field 0:
>     Schema int
>     Offset 0, size 4
>   Field 1:
>     Schema long
>     Offset 4, size 8
>   Field 2:
>     Schema long
>     Offset 12, size 8
>   Field 3:
>     Schema SeAddress
>     Offset 20, size 8
>   Field 4:
>     Schema array
>     Offset 28, size 16
>   TOTAL SIZE: 44
> Program received signal SIGSEGV, Segmentation fault.
> avro_generic_long_init (iface=0xff26e8fc <AVRO_GENERIC_LONG_CLASS>, 
> vself=0x5297614) at generic.c:1469
> 1469            *self = 0;
> (gdb) p self
> $1 = (int64_t *) 0x5297614
> (gdb) 
> long integers must be aligned on 64-bit boundaries for SPARC systems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to