profile
viewpoint

Ask questionsSegmentation violation with multiple passes

For the following file:

template <typename...> struct a;
template <typename> struct b { b(...); };
namespace {
auto bx() -> b<a<>> {
  using by = b<int>;
  by bz;
  return bz;
}
} // namespace

~(yes, it seems cvise itself can't make that smaller!)~ oops, didn't have -Wno-unused!

The following holds:

#!/bin/bash

set -eu

clang_delta="/home/avj/clones/cvise/master/build/clang_delta/clang_delta"
passes="aggregate-to-scalar callexpr-to-value param-to-global param-to-local remove-enum-member-value remove-namespace remove-nested-function remove-unused-function replace-callexpr simplify-callexpr union-to-struct local-to-global param-to-global"
file=unit.cpp
pass_no=1

g++ -Wall -Werror -Wno-unused -c $file

for pass_name in $passes; do
    ret=0
    ${clang_delta} --transformation=${pass_name} --counter=${pass_no} ${file} || ret=$?

    if [ $ret -ne 139 ]; then
        exit 1
    fi
done

echo "All failed"

exit 0

# EOF

That is, for all of passes aggregate-to-scalar, param-to-local, remove-nested-function, local-to-global, union-to-struct, remove-namespace and param-to-global, clang_delta crashes.

marxin/cvise

Answer questions marxin

What an input test case, please report it to the upstream creduce project. Hope they can help us with that.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List