Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9230027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:43:11+00:00 2026-06-18T05:43:11+00:00

I’m working on a build for an old project that wasn’t maintained well at

  • 0

I’m working on a build for an old project that wasn’t maintained well at all; it’s more or less a hodgepodge of hundreds of independent projects that get cobbled together. Naturally, that means there’s a lot of inappropriate things going on.

There’s probably 50-100 executables, and around 300 shared/static libraries. Some of the libraries are built with the -mt flag (sun studio; -pthreads appears to be the gcc equivalent), others aren’t.

This seems potentially problematic to me. Suppose I have libA.so and libB.so — A was built with -mt, but not B. I expect if the application linked against A & B is single-threaded there won’t be any problems (feel free to correct me on that). However, if the app is threaded then this situation opens a fun can of worms.

I’m inclined to just build everything with -mt and have done with it. Most of the office agrees with this plan, but there’s one dissenter. My expectation is that this will just create a potential degradation in performance, but at the moment performance is already abysmal because of the poor state of this project; so I’m not worried about that.

In short: are there any potential pitfalls with doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:43:12+00:00Added an answer on June 18, 2026 at 5:43 am

    I would expect problems for libraries which are actively caring about being compiled with threads (#ifdef _REENTRANT is a sign of it). When some code has not been compiled for ages, and it suddenly becomes active, its problems might become visible. (It’s even not so much about threading, just about any code which was ifdeffed out for a long time).

    A special case of the above is a library which tries to use pthread_atfork in a manner which is described in RATIONALE section here: these things are far from well-defined, posixly speaking, because creating threads, releasing locks, etc. is not async-signal safe. Your platform may provide some guarantees about what actually happens (e.g. it might even specify whether atfork handlers are invoked for the fork happening in a signal handler). This thing should not matter if fork is not actually used, but otherwise it has a real chance to misbehave.

    Summary: don’t expect much problems from libraries that don’t care about threading. Expect them from libraries that care and are (possibly, in some circumstances) doing it wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.