Closed Bug 776878 Opened 12 years ago Closed 9 years ago

AssertionError in pymake\parser.py - "assert offset >= self.lstart and offset <= self.lend" with unterminated function call at the end of a line

Categories

(Firefox Build System :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

Details

(Whiteboard: [pymake])

Attachments

(1 file)

Attached file Build log
Windows 64 bit
MozillaBuild 1.6.1
Windows SDK v7.0A
MSVC 2010
start-msvc10.bat

Building from:
https://hg.mozilla.org/integration/mozilla-inbound/rev/44e8a79e4be3

Had clobbered.

.mozconfig:
  MOZ_OBJDIR=d:/obj-inbound
  MOZ_MAKE_FLAGS=-j12

python $INBOUND_DIR/build/pymake/make.py -s -f client.mk

{
Generating LALR tables
Traceback (most recent call last):
  File "d:/srcdirs/inbound/build/pymake/make.py", line 18, in <module>
    pymake.process.ParallelContext.spin()
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 341, in spin
    c.run()
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 271, in run
    cb(*args, **kwargs)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 680, in _depfinishedparallel
    self.resolvecb(error=self.error, didanything=self.didanything)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 574, in resolvecb
    self.runnext()
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 594, in runnext
    self.rlist.pop(0).runcommands(self.indent, self.commandscb)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 764, in runcommands
    self._commandcb(False)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 701, in _commandcb
    self.commands.pop(0)(self._commandcb)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1199, in __call__
    process.call(self.cline, loc=self.loc, cb=self._cb, context=self.context, **self.kwargs)
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 86, in call
    cb(res=0)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1195, in _cb
    self.usercb(error=False)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 701, in _commandcb
    self.commands.pop(0)(self._commandcb)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1199, in __call__
    process.call(self.cline, loc=self.loc, cb=self._cb, context=self.context, **self.kwargs)
  File "d:\srcdirs\inbound\build\pymake\pymake\process.py", line 95, in call
    command.main(argv[2:], env, cwd, cb)
  File "d:\srcdirs\inbound\build\pymake\pymake\command.py", line 271, in main
    _MakeContext(makeflags, makelevel, workdir, context, env, targets, options, ostmts, overrides, cb)
  File "d:\srcdirs\inbound\build\pymake\pymake\command.py", line 94, in __init__
    self.remakecb(True)
  File "d:\srcdirs\inbound\build\pymake\pymake\command.py", line 124, in remakecb
    self.makefile.include(f)
  File "d:\srcdirs\inbound\build\pymake\pymake\data.py", line 1554, in include
    stmts = parser.parsefile(fspath)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 373, in parsefile
    return _parsecache.get(pathname)
  File "d:\srcdirs\inbound\build\pymake\pymake\util.py", line 136, in get
    item.o = self.cfunc(key)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 351, in _parsefile
    stmts = parsestring(fd.read(), pathname)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 390, in parsestring
    e, token, offset = parsemakesyntax(d, offset + 1, (), itercommandchars)
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 768, in parsemakesyntax
    raise SyntaxError("Unterminated function call", d.getloc(offset))
  File "d:\srcdirs\inbound\build\pymake\pymake\parser.py", line 64, in getloc
    assert offset >= self.lstart and offset <= self.lend
AssertionError
}

Full log attached.
Whiteboard: [pymake]
I've got the same situation, same development environment, my mozconfig is
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj
mk_add_options MOZ_MAKE_FLAGS="-j4"
(In reply to Siddharth Agarwal [:sid0] from comment #3)
> http://hg.mozilla.org/mozilla-central/rev/cb0b3e605cf1 should hopefully fix
> this.

Even if it does, there's a problem if makefiles can trigger pymake asserts! ;-)
(In reply to Siddharth Agarwal [:sid0] from comment #3)
> http://hg.mozilla.org/mozilla-central/rev/cb0b3e605cf1 should hopefully fix
> this.

Works, thank you :-)

(Or more I now get as far as bug 774062, but that was pre-existing)
Indeed, that should fix it. The assert appears to be an error that happens only when we're reporting a makefile parsing error ("Unterminated function call") at the very end of a line (the offset for the reported error points out of the line. We should fix the pymake error code.
Summary: Windows build failure: AssertionError in pymake\parser.py - "assert offset >= self.lstart and offset <= self.lend" → AssertionError in pymake\parser.py - "assert offset >= self.lstart and offset <= self.lend" with unterminated function call at the end of a line
Severity: critical → normal
Moved to https://github.com/mozilla/pymake/issues/22
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: