Custom Query (147 matches)
Results (19 - 21 of 147)
Ticket | Owner | Reporter | Resolution | Summary |
---|---|---|---|---|
#38 | fixed | Resolver error with strdup from string.h | ||
Description |
So really hard to track down error. This crashes: #include <string.h> void num_error_msg() { strdup( "" ); } But if I replace the include with a forward declaration of strdup it works: extern "C" { extern char *strdup (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); } I did everything I could to revert back to the standard case, but we still were unable to track down exactly what the problem was. I ran it on p1g2 with gcc 6.3 and gcc 4.9. And for those who want further reading, the crash message: /u/ajbeach/cfa-cc/bin/cfa -g -Wall -Wno-unused-function -quiet -g -O2 except-2.c -o except-2 *CFA runtime error* program cfa-cpp terminated with segment fault. Stack back trace for: /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp (0) /lib/x86_64-linux-gnu/libc.so.6 : (/*unknown*/)+0x354b0 [0x7f339ef154b0] (1) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::adjustExprType(Type*&, ResolvExpr::TypeEnvironment const&, SymTab::Indexer const&)+0x41 [0x5c4641] (2) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::find(Expression*, bool, bool)+0x9c [0x5b156c] (3) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::visit(ConditionalExpr*)+0x210 [0x5b6440] (4) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::find(Expression*, bool, bool)+0x44 [0x5b1514] (5) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::visit(ConditionalExpr*)+0x15f [0x5b638f] (6) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::find(Expression*, bool, bool)+0x44 [0x5b1514] (7) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::visit(CastExpr*)+0xe1 [0x5b2cd1] (8) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::AlternativeFinder::find(Expression*, bool, bool)+0x44 [0x5b1514] (9) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::resolveInVoidContext(Expression*, SymTab::Indexer const&, ResolvExpr::TypeEnvironment&)+0x90 [0x5b2800] (10) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::findVoidExpression(Expression*, SymTab::Indexer const&)+0x46 [0x5c51e6] (11) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::Resolver::visit(ExprStmt*)+0x1d [0x5c524d] (12) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : SymTab::Indexer::visit(CompoundStmt*)+0x52 [0x5d9cf2] (13) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : SymTab::Indexer::visit(FunctionDecl*)+0x7e [0x5d9fbe] (14) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::Resolver::visit(FunctionDecl*)+0x4f [0x5c6d6f] (15) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : ResolvExpr::resolve(std::__cxx11::list<Declaration*, std::allocator<Declaration*> >)+0x7a [0x5c536a] (16) /u/ajbeach/cfa-cc/lib/cfa/cfa-cpp : main(/*unknown*/)+0x68c [0x4b25ac] make: *** [Makefile:832: except-2] Error 1 |
|||
#44 | invalid | zero_t causes warnings because it always codgens as long int | ||
Description |
zero_t should intelligently codegen as long int, void *, or void (*)() depending on the context. An example where this is necessary: typedef void (*fptr_t)(); void f(int); int main() { fptr_t x; x = f; } The assignment function is correctly chosen as forall( ftype FT ) FT * ?=?( FT * &, zero_t ); But codegens as ((void)(__x__PF___2=((long int )__f__F_i__1))); Which causes a warning in gcc: warning: assignment makes pointer from integer without a cast |
|||
#45 | fixed | Const ref error in tuple | ||
Description |
The following code asserts : #include <stddef.h> struct S {}; [S *, int] foo() { return [NULL, -1]; } |
Note: See TracQuery
for help on using queries.