Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning in CartBuffer.tpp #784

Closed
psychocoderHPC opened this issue Mar 27, 2015 · 3 comments
Closed

Warning in CartBuffer.tpp #784

psychocoderHPC opened this issue Mar 27, 2015 · 3 comments
Assignees
Labels
duplicate duplicate issue or pull-request (link main issue!) warning code produces/produced a warning

Comments

@psychocoderHPC
Copy link
Member

The new pull #773 request bring up a warning .

src/libPMacc/include/cuSTL/container/CartBuffer.tpp: In member function ‘virtual void picongpu::TotalDivJ::notify(uint32_t)’:
src/libPMacc/include/cuSTL/container/CartBuffer.tpp:155:1: warning: ‘fieldJ.PMacc::container::CartBuffer<PMacc::math::Vector<float, 3>, 3, PMacc::allocator::EmptyAllocator, mpl_::void_, mpl_::void_>::refCount’ may be used uninitialized in this function [-Wuninitialized]
src/picongpu/include/plugins/TotalDivJ.tpp:82:69: note: ‘fieldJ.PMacc::container::CartBuffer<PMacc::math::Vector<float, 3>, 3, PMacc::allocator::EmptyAllocator, mpl_::void_, mpl_::void_>::refCount’ was declared here
In file included from tmpxft_0000a156_00000000-3_main.cudafe1.stub.c:1:0:
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs" [enabled by default]

I don't know why this warning was not shown before, but PseudoBuffer call only the empty default constructor of CartBuffer. In this case member variables of CartBuffer like refCount were not initialized. If so it can create NULL pointer exceptions or destroy the program stack.

@psychocoderHPC psychocoderHPC added the warning code produces/produced a warning label Mar 27, 2015
@psychocoderHPC psychocoderHPC added this to the Open Beta milestone Mar 27, 2015
@ax3l
Copy link
Member

ax3l commented Mar 27, 2015

@Heikman the first 3 lines are relevant, the warning -Wno-unused-local-typedefs is a work around for a FindCUDA.cmake bug and only occurs on old gnu compilers.

@heikoburau
Copy link
Member

I just saw that this is the same issue as #94. We can fix it by removing the TotalDivJ plugin.

@ax3l
Copy link
Member

ax3l commented Mar 29, 2015

Closed as duplicate of #94

@ax3l ax3l closed this as completed Mar 29, 2015
@ax3l ax3l added the duplicate duplicate issue or pull-request (link main issue!) label Mar 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate duplicate issue or pull-request (link main issue!) warning code produces/produced a warning
Projects
None yet
Development

No branches or pull requests

3 participants