DRMacIver / shrinkray

Shrinkray is a modern multi-format test-case reducer
MIT License
86 stars 2 forks source link

crash #2

Closed regehr closed 9 months ago

regehr commented 9 months ago

I can give you instructions to repro this, but you'll have to build your own LLVM, since the distributed binaries have assertions disabled and the thing I'm reducing here is an assertion violation. let me know if you want that!

regehr@john-home:~/reduce$ time ~/.local/bin/shrinkray ./test1.sh 1.cpp 
Traceback (most recent call last):
  File "/home/regehr/.local/bin/shrinkray", line 8, in <module>
    sys.exit(main())
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/__main__.py", line 397, in main
    async def _() -> None:
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/trio/_core/_run.py", line 2093, in run
    raise runner.main_task_outcome.error
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/__main__.py", line 404, in _
    async with trio.open_nursery() as nursery:
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/trio/_core/_run.py", line 881, in __aexit__
    raise combined_error_from_nursery
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/__main__.py", line 573, in _
    await reducer.run()
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/reducer.py", line 257, in run
    await self.pump(pump)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/reducer.py", line 186, in pump
    pumped = await rp(self.target)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/passes/clangdelta.py", line 170, in apply
    n = await clang_delta.query_instances(transformation, target)
  File "/home/regehr/.local/pipx/venvs/shrinkray/lib/python3.10/site-packages/shrinkray/passes/clangdelta.py", line 95, in query_instances
    with NamedTemporaryFile(suffix=".cpp", delete_on_close=False) as tmp:
TypeError: NamedTemporaryFile() got an unexpected keyword argument 'delete_on_close'

real    1m13.936s
user    8m54.242s
sys 1m34.264s
regehr@john-home:~/reduce$ 
DRMacIver commented 9 months ago

Ah, I think the problem here is that Shrink Ray only works on Python 3.11+ (which I hadn't realised) and I don't enforce that anywhere. I'll enforce a lower bound and add some extra info to the installation instructions.

DRMacIver commented 9 months ago

Sorry, correction, the minimum version is actually 3.12, not 3.11. I've now added a section to the README and enforced it when installing.