Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 648363 Details for
Bug 855403
WinSDK SSL client: memory leak; server exit hang
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
bz855403_ssl_mem_leak.cpp
bz855403_ssl_mem_leak.cpp (text/x-c++src), 3.30 KB, created by
Petra Svobodová
on 2012-11-20 09:41:36 UTC
(
hide
)
Description:
bz855403_ssl_mem_leak.cpp
Filename:
MIME Type:
Creator:
Petra Svobodová
Created:
2012-11-20 09:41:36 UTC
Size:
3.30 KB
patch
obsolete
>/* > * > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements. See the NOTICE file > * distributed with this work for additional information > * regarding copyright ownership. The ASF licenses this file > * to you under the Apache License, Version 2.0 (the > * "License"); you may not use this file except in compliance > * with the License. You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, > * software distributed under the License is distributed on an > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > * KIND, either express or implied. See the License for the > * specific language governing permissions and limitations > * under the License. > * > */ > >#include <qpid/messaging/Connection.h> >#include <qpid/messaging/Message.h> >#include <qpid/messaging/Receiver.h> >#include <qpid/messaging/Sender.h> >#include <qpid/messaging/Session.h> > >#include <iostream> >#include <fstream> >#include <cstdio> > ># include <windows.h> > >using namespace qpid::messaging; > > >void raise_point(char * in_str) >{ > //creates a file to detect the start phase; > //process what runs the example will remove it after reading memory usage > std::ofstream outfile (in_str); > outfile << in_str << std::endl; > outfile.close(); > Sleep(5000); >} > > >int main(int argc, char** argv) { > std::string broker = argc > 1 ? argv[1] : "localhost:5672"; > std::string address = argc > 2 ? argv[2] : "amq.topic"; > std::string connectionOptions = argc > 3 ? argv[3] : ""; > > for (int i=0; i<10000; i++) > { > try { > raise_point ("START_FILE"); > Connection connection(broker, connectionOptions); > > Session session; > Receiver receiver; > Sender sender; > Message message; > > std::cout << "Opening connection " << i << std::endl; > > connection.open(); > //raise_point ("S2"); > session = connection.createSession(); > > receiver = session.createReceiver(address); > sender = session.createSender(address); > > // > // QPID-4257 > // BZ 855403 > // > // This source file can replace hello_world.cpp in any winsdk. > // > // To demonstrate the memory leak execute these two lines: > // On each pass the client process grows. >#if 1 > sender.send(Message("Hello world!")); > > message = receiver.fetch(Duration::SECOND * 1); >#endif > > // To demonstrate the hang - execute this one line: > // While the fetch is in effect, kill the broker. > // This process should exit from fetch and continue but it does not. >/* >#if 0 > message = receiver.fetch(Duration::FOREVER); >#endif >*/ > > // std::cout << message.getContent() << std::endl; > session.acknowledge(); > > sender.close(); > receiver.close(); > session.close(); > connection.close(); > > > } catch(const std::exception& error) { > std::cerr << error.what() << std::endl; > //connection.close(); > // return 1; > } > } > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 855403
:
611451
| 648363