google / jsonnet

Jsonnet - The data templating language
http://jsonnet.org
Apache License 2.0
6.98k stars 440 forks source link

stack-overflow exists in the function maybeParseGreedy in parser.cpp #1117

Open SEU-SSL opened 11 months ago

SEU-SSL commented 11 months ago

System info Ubuntu x86_64, clang 12.0 version: jsonnetfmt-v0.20.0

Command line ./jsonnetfmt -i poc

Poc poc:poc

AddressSanitizer output ==2956134==ERROR: AddressSanitizer: stack-overflow on address 0x7fff529382e0 (pc 0x000000575bd4 bp 0x7fff5293a8b0 sp 0x7fff529381e0 T0)

0 0x575bd4 in jsonnet::internal::(anonymous namespace)::Parser::maybeParseGreedy() /src/jsonnet-crash/core/parser.cpp:749

1 0x56b95d in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:910:20

2 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

3 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

4 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

5 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

6 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

7 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

8 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

9 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

10 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

11 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

12 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

13 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

14 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

15 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

16 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

17 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

18 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

19 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

20 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

21 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

22 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

23 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

24 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

25 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

26 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

27 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

28 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

29 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

30 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

31 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

32 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

33 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

34 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

35 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

36 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

37 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

38 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

39 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

40 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

41 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

42 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

43 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

44 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

45 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

46 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

47 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

48 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

49 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

50 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

51 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

52 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

53 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

54 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

55 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

56 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

57 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

58 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

59 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

60 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

61 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

62 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

63 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

64 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

65 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

66 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

67 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

68 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

69 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

70 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

71 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

72 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

73 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

74 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

75 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

76 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

77 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

78 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

79 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

80 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

81 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

82 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

83 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

84 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

85 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

86 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

87 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

88 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

89 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

90 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

91 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

92 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

93 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

94 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

95 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

96 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

97 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

98 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

99 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

100 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

101 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

102 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

103 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

104 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

105 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

106 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

107 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

108 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

109 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

110 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

111 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

112 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

113 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

114 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

115 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

116 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

117 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

118 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

119 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

120 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

121 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

122 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

123 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

124 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

125 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

126 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

127 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

128 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

129 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

130 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

131 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

132 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

133 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

134 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

135 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

136 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

137 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

138 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

139 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

140 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

141 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

142 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

143 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

144 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

145 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

146 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

147 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

148 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

149 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

150 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

151 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

152 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

153 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

154 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

155 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

156 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

157 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

158 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

159 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

160 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

161 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

162 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

163 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

164 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

165 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

166 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

167 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

168 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

169 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

170 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

171 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

172 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

173 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

174 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

175 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

176 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

177 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

178 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

179 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

180 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

181 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

182 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

183 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

184 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

185 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

186 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

187 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

188 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

189 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

190 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

191 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

192 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

193 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

194 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

195 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

196 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

197 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

198 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

199 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

200 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

201 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

202 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

203 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

204 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

205 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

206 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

207 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

208 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

209 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

210 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

211 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

212 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

213 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

214 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

215 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

216 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

217 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

218 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

219 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

220 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

221 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

222 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

223 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

224 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

225 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

226 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

227 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

228 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

229 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

230 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

231 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

232 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

233 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

234 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

235 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

236 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

237 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

238 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

239 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

240 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

241 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

242 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

243 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

244 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

245 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

246 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

247 0x56ba2c in jsonnet::internal::(anonymous namespace)::Parser::parse(unsigned int) /src/jsonnet-crash/core/parser.cpp:920:20

248 0x5864f2 in jsonnet::internal::(anonymous namespace)::Parser::parseTerminalBracketsOrUnary() /src/jsonnet-crash/core/parser.cpp:675:31

SUMMARY: AddressSanitizer: stack-overflow /src/jsonnet-crash/core/parser.cpp:749 in jsonnet::internal::(anonymous namespace)::Parser::maybeParseGreedy() ==2956134==ABORTING

johnbartholomew commented 8 months ago

The fuzz generated input is basically a large number of opening parentheses. It has a few other characters mixed in, but that's not actually very interesting, the stack overflow can be reproduced just with a few hundred open parens on their own.

This is basically expected behaviour for a recursive descent parser. The obvious way to "fix" it is to track recursion depth and putting a conservatively chosen limit on it, with the intention of aborting with a "graceful" error before hitting stack overflow. Not clear whether it's actually worth doing that though.

Another way of fixing it is to restructure the whole parser to get rid of the recursion (which would use some heap-allocated explicit stack structure instead), but that is tantamount to a full parser rewrite.