[galib] segfault with galib

Patrick Coquillard patrick.coquillard at unice.fr
Thu May 19 04:21:14 EDT 2011


Le 18/05/2011 17:11, Acero Fernandez Alicia a écrit :
>
> Hello,
>
> I have to call a function from the objective function and something 
> extrange happens because when I call this function the error appears 
> and it disappears when I take out the function.
>
> Could anyone help me, please?
>
> Regards
>
> ------------------------------------------------------------------------
>
> *De:*galib-bounces at mit.edu [mailto:galib-bounces at mit.edu] *En nombre 
> de *Acero Fernandez Alicia
> *Enviado el:* miércoles, 18 de mayo de 2011 16:09
> *Para:* galib at mit.edu
> *Asunto:* [galib] segfault with galib
>
> Hello,
>
> Could anyone help me?I am trying to use galib with a c++ code 
> butIonlygeta segfault. I tried to analyse it with valgrind and I can 
> see the following:
>
Use of uninitialised value of size 8
Invalid read of size 8
Address 0x141 is not stack'd, malloc'd or (recently) free'd
Process terminating with default action of signal 11 (SIGSEGV)

Your function missed to allocate mem to a pointer before affectation ? 
(use new and delete)

Regards, P.




> ==5419== Use of uninitialised value of size 8
>
> ==5419==    at 0x41D112: 
> ClusterSimulator::simulate(std::vector<unsigned int, 
> std::allocator<unsigned int> > const&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x42E0FF: Objective(GAGenome&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x4417A3: GAGenome::evaluate(_GABoolean) const 
> (GAGenome.C:83)
>
> ==5419==    by 0x43DFC8: GAPopulation::DefaultEvaluator(GAPopulation&) 
> (GAPopulation.C:38)
>
> ==5419==    by 0x43D180: GAPopulation::evaluate(_GABoolean) 
> (GAPopulation.h:123)
>
> ==5419==    by 0x43C500: GASimpleGA::initialize(unsigned int) 
> (GASimpleGA.C:148)
>
> ==5419==    by 0x434A5B: GAGeneticAlgorithm::evolve(unsigned int) 
> (GABaseGA.h:136)
>
> ==5419==    by 0x42E3D3: pruebas(std::vector<unsigned int, 
> std::allocator<unsigned int> > const&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x42EB1B: main (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==
>
> ==5419== Invalid read of size 8
>
> ==5419==    at 0x41D112: 
> ClusterSimulator::simulate(std::vector<unsigned int, 
> std::allocator<unsigned int> > const&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x42E0FF: Objective(GAGenome&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x4417A3: GAGenome::evaluate(_GABoolean) const 
> (GAGenome.C:83)
>
> ==5419==    by 0x43DFC8: GAPopulation::DefaultEvaluator(GAPopulation&) 
> (GAPopulation.C:38)
>
> ==5419==    by 0x43D180: GAPopulation::evaluate(_GABoolean) 
> (GAPopulation.h:123)
>
> ==5419==    by 0x43C500: GASimpleGA::initialize(unsigned int) 
> (GASimpleGA.C:148)
>
> ==5419==    by 0x434A5B: GAGeneticAlgorithm::evolve(unsigned int) 
> (GABaseGA.h:136)
>
> ==5419==    by 0x42E3D3: pruebas(std::vector<unsigned int, 
> std::allocator<unsigned int> > const&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x42EB1B: main (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==  Address 0x141 is not stack'd, malloc'd or (recently) free'd
>
> ==5419==
>
> ==5419==
>
> ==5419== Process terminating with default action of signal 11 (SIGSEGV)
>
> ==5419==  Access not within mapped region at address 0x141
>
> ==5419==    at 0x41D112: 
> ClusterSimulator::simulate(std::vector<unsigned int, 
> std::allocator<unsigned int> > const&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x42E0FF: Objective(GAGenome&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x4417A3: GAGenome::evaluate(_GABoolean) const 
> (GAGenome.C:83)
>
> ==5419==    by 0x43DFC8: GAPopulation::DefaultEvaluator(GAPopulation&) 
> (GAPopulation.C:38)
>
> ==5419==    by 0x43D180: GAPopulation::evaluate(_GABoolean) 
> (GAPopulation.h:123)
>
> ==5419==    by 0x43C500: GASimpleGA::initialize(unsigned int) 
> (GASimpleGA.C:148)
>
> ==5419==    by 0x434A5B: GAGeneticAlgorithm::evolve(unsigned int) 
> (GABaseGA.h:136)
>
> ==5419==    by 0x42E3D3: pruebas(std::vector<unsigned int, 
> std::allocator<unsigned int> > const&) (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ==5419==    by 0x42EB1B: main (in 
> /home/u5077/simulador/Scheduling/Simulator/schedulers)
>
> ---------------------------- Confidencialidad: Este mensaje y sus 
> ficheros adjuntos se dirige exclusivamente a su destinatario y puede 
> contener información privilegiada o confidencial. Si no es vd. el 
> destinatario indicado, queda notificado de que la utilización, 
> divulgación y/o copia sin autorización está prohibida en virtud de la 
> legislación vigente. Si ha recibido este mensaje por error, le rogamos 
> que nos lo comunique inmediatamente respondiendo al mensaje y proceda 
> a su destrucción. Disclaimer: This message and its attached files is 
> intended exclusively for its recipients and may contain confidential 
> information. If you received this e-mail in error you are hereby 
> notified that any dissemination, copy or disclosure of this 
> communication is strictly prohibited and may be unlawful. In this 
> case, please notify us by a reply and delete this email and its 
> contents immediately. ----------------------------
>
>
> _______________________________________________
> galib mailing list
> galib at mit.edu
> http://mailman.mit.edu/mailman/listinfo/galib


-- 
Le savoir n'est pas une marchandise,
L'Université n'est pas une entreprise.

L'Excellence [de Sarkozy] est un  cadavre qui fait courir
le petit peuple des chercheurs qui rêvait à des jours meilleurs (P. Maillard, 2011)

--

Dr. Patrick Coquillard,
UMR Interactions Biotiques et Santé des Végétaux,
400, routes des Chappes
06 903, Sophia Antipolis

Tél/fax : #33(0) 492 386 430

http://www.unice.fr/coquillard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20110519/9babea45/attachment.htm


More information about the galib mailing list