[Pkg-erlang-devel] Bug#756515: erlang-edoc: edoc crashes on valid Erlang source with tricky macro

Balint Reczey balint at balintreczey.hu
Wed Jul 30 14:12:36 UTC 2014


Package: erlang-edoc
Version: 1:17.1-dfsg-4
Severity: normal

Dear Maintainer,

The following small Erlang source file crashes edoc in the way listed below:

$ cat edocbug.erl -module(edocbug).

-export([bar/1]).
-define(FOO(), a -> ok).

bar(A) ->
    case A of
    ?FOO()
    end.

$ erlc edocbug.erl $ erl
Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:4:4] [async-threads:10]
[kernel-poll:false]

Eshell V6.1  (abort with ^G)
1> edoc:file("edocbug.erl").
edocbug.erl: at line 9: syntax error before: 'end'
** exception exit: error
     in function  edoc:'-check_forms/2-fun-0-'/2 (edoc.erl, line 770)
     in call from lists:foreach/2 (lists.erl, line 1336)
     in call from edoc:read_source/2 (edoc.erl, line 660)
     in call from edoc_extract:source/3 (edoc_extract.erl, line 52)
     in call from edoc:read/2 (edoc.erl, line 538)
     in call from edoc:file/2 (edoc.erl, line 116)

Cheers,
Balint

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable'), (500,
'testing-updates'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages erlang-edoc depends on:
ii  erlang-base          1:17.1-dfsg-4
ii  erlang-inets         1:17.1-dfsg-4
ii  erlang-syntax-tools  1:17.1-dfsg-4
ii  erlang-xmerl         1:17.1-dfsg-4

erlang-edoc recommends no packages.

Versions of packages erlang-edoc suggests:
ii  erlang           1:17.1-dfsg-4
ii  erlang-doc       1:17.1-dfsg-4
ii  erlang-manpages  1:17.1-dfsg-4

-- no debconf information



More information about the Pkg-erlang-devel mailing list