[erlang-bugs] beam_validator does not validate against circularity in constructed values

Erik Søe Sørensen <>
Mon Jun 27 11:00:48 CEST 2011

The following function passes beam_validator verification, but 
constructs a recursive data structure:

    {module, beamtoying4}.  %% version = 0
    {exports, [{module_info,0},{module_info,1},{recdata,1}]}.
    {labels, 2}.
    {function, recdata, 1, 2}.


    :q$ erlc beamtoying4.S
    :q$ erl
    Erlang R14B (erts-5.8.1) [source] [64-bit] [smp:8:8] [rq:8]
    [async-threads:0] [kernel-poll:false]

    Eshell V5.8.1  (abort with ^G)
    1> beamtoying4:recdata(x).

(The REPL is then stuck.)

Erik Søe Sørensen

More information about the erlang-bugs mailing list