Repository: pytorch
Issue: Uninitialised value was created by a stack allocation, reported by valgrind
Labels: triage review,oncall: jit,triaged

```
==17== Memcheck, a memory error detector
==17== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==17== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==17== Command: ros/src/inference_api/test_graph_pytorch
==17== 
==17== Warning: set address range perms: large range [0x14dfa000, 0x373f0000) (defined)
==17== Warning: set address range perms: large range [0x5ddf4000, 0x72c1b000) (defined)
2020-02-13 03:23:28.469999: I external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-02-13 03:23:30.154755: I external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
==17== Conditional jump or move depends on uninitialised value(s)
==17==    at 0x4B7E905: IValue (ivalue.h:66)
==17==    by 0x4B7E905: optional (Optional.h:401)
==17==    by 0x4B7E905: c10::Argument::Argument(c10::Argument const&) (function_schema.h:34)
==17==    by 0x4B7DD97: construct<c10::Argument, c10::Argument &> (memory:1825)
==17==    by 0x4B7DD97: __construct<c10::Argument, c10::Argument &> (memory:1717)
==17==    by 0x4B7DD97: construct<c10::Argument, c10::Argument &> (memory:1560)
==17==    by 0x4B7DD97: __construct_range_forward<c10::Argument *, c10::Argument *> (memory:1645)
==17==    by 0x4B7DD97: __construct_at_end<c10::Argument *> (vector:1074)
==17==    by 0x4B7DD97: std::__1::vector<c10::Argument, std::__1::allocator<c10::Argument> >::vector(std::__1::vector<c10::Argument, std::__1::allocator<c10::Argument> > const&) (vector:1257)
==17==    by 0x12AC2F6B: c10::FunctionSchema::FunctionSchema(c10::FunctionSchema const&) (function_schema.h:132)
==17==    by 0x139D366A: c10::RegisterOperators::registerOp_(c10::RegisterOperators::Options&&) (op_registration.cpp:138)
==17==    by 0x139D247D: c10::RegisterOperators::checkSchemaAndRegisterOp_(c10::RegisterOperators::Options&&) (op_registration.cpp:59)
==17==    by 0x138BF44D: op (op_registration.h:455)
==17==    by 0x138BF44D: __cxx_global_var_init (Copy.cpp:168)
==17==    by 0x138BF44D: _GLOBAL__sub_I_Copy.cpp (Copy.cpp:0)
==17==    by 0x4010732: call_init (dl-init.c:72)
==17==    by 0x4010732: _dl_init (dl-init.c:119)
==17==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==17==  Uninitialised value was created by a stack allocation
==17==    at 0x12DAD3CD: torch::jit::script::(anonymous namespace)::SchemaParser::parseArgument(unsigned long, bool, bool) (function_schema_parser.cpp:112)
==17== 
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:IValue
   fun:optional
   fun:_ZN3c108ArgumentC2ERKS0_
   fun:construct<c10::Argument, c10::Argument &>
   fun:__construct<c10::Argument, c10::Argument &>
   fun:construct<c10::Argument, c10::Argument &>
   fun:__construct_range_forward<c10::Argument *, c10::Argument *>
   fun:__construct_at_end<c10::Argument *>
   fun:_ZNSt3__16vectorIN3c108ArgumentENS_9allocatorIS2_EEEC2ERKS5_
   fun:_ZN3c1014FunctionSchemaC2ERKS0_
   fun:_ZN3c1017RegisterOperators11registerOp_EONS0_7OptionsE
   fun:_ZN3c1017RegisterOperators25checkSchemaAndRegisterOp_EONS0_7OptionsE
   fun:op
   fun:__cxx_global_var_init
   fun:_GLOBAL__sub_I_Copy.cpp
   fun:call_init
   fun:_dl_init
   obj:/lib/x86_64-linux-gnu/ld-2.27.so
}
==17== 
==17== Exit program on first error (--exit-on-first-error=yes)
```

cc @ezyang @gchanan @zou3519 @suo