Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920066 - dev-util/ctags fails ruby parser on sparc
Summary: dev-util/ctags fails ruby parser on sparc
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Vim Maintainers
URL: https://github.com/universal-ctags/ct...
Whiteboard:
Keywords:
Depends on:
Blocks: unaligned-access 919480
  Show dependency tree
 
Reported: 2023-12-15 23:59 UTC by matoro
Modified: 2023-12-20 01:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_920066.txt,404.66 KB, text/plain)
2023-12-16 00:02 UTC, matoro
Details
bt full (file_920066.txt,3.12 KB, text/plain)
2023-12-16 02:10 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2023-12-15 23:59:04 UTC
build.log and emerge --info in attachment.

Exit code 138 = killed by SIGBUS.  Manually confirmed like so:

$ ./ctags --verbose --options=NONE --fields=-T --optlib-dir=+.
/Units/parser-ruby.r/simple.rb.d/optlib -o - --options=./Units/parser-ruby.r/simple.rb.d/args.ctags ./Units/parser-ruby.r/simple.rb.d/input.rb

...


Reading command line arguments
Get file language for ./Units/parser-ruby.r/simple.rb.d/input.rb
        pattern: input.rb
                #candidates: 1
                        0: Ruby (extension: "rb")
                #candidates after sorting and filtering: 1
                        0: Ruby (extension: "rb")
OPENING ./Units/parser-ruby.r/simple.rb.d/input.rb as Ruby language file [new]
Initialize parser: Ruby
Initialize parser: RSpec
Bus error

Tested all versions in tree and issue is present everywhere including git master.

Reproducible: Always
Comment 1 matoro archtester 2023-12-16 00:02:24 UTC
Created attachment 879550 [details]
build.log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-16 01:41:51 UTC
Please get a backtrace.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-16 01:42:01 UTC
(In reply to Sam James from comment #2)
> Please get a backtrace.

(and/or ubsan bt)
Comment 4 matoro archtester 2023-12-16 02:10:24 UTC
Created attachment 879555 [details]
bt full

Example backtrace (from 9999, a4d751b)
Comment 5 matoro archtester 2023-12-16 02:23:21 UTC
UBSAN does catch it!

Reading command line arguments
Get file language for ./Units/parser-ruby.r/simple.rb.d/input.rb
        pattern: input.rb
                #candidates: 1
                        0: Ruby (extension: "rb")
                #candidates after sorting and filtering: 1
                        0: Ruby (extension: "rb")
OPENING ./Units/parser-ruby.r/simple.rb.d/input.rb as Ruby language file [new]
Initialize parser: Ruby
Initialize parser: RSpec
parsers/ruby.c:746:11: runtime error: member access within misaligned address 0x00015472f23c for type 'struct blockData', which requires 8 byte alignment
0x00015472f23c: note: pointer points here
  05 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^ 
parsers/ruby.c:755:11: runtime error: member access within misaligned address 0x00015472f23c for type 'struct blockData', which requires 8 byte alignment
0x00015472f23c: note: pointer points here
  05 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^ 
parsers/ruby.c:764:11: runtime error: member access within misaligned address 0x00015472f23c for type 'struct blockData', which requires 8 byte alignment
0x00015472f23c: note: pointer points here
  05 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^
Comment 6 matoro archtester 2023-12-20 01:31:32 UTC
Fixed in https://github.com/universal-ctags/ctags/pull/3883