问:
Xamarin.Android TcpClient not working sometimes
I'm trying to create an application where I have to use WHOIS to get some information I need.

To get the WHOIS information I use this function I found on here and adjusted a little:

string Whois(string domain, string whoisServer = "whois.iana.org")
{
    string toReturn = "";
    TcpClient tcpClinetWhois = new TcpClient(whoisServer, 43);
    MemoryStream memoryStreamWhois = new MemoryStream();
    Task copying = tcpClinetWhois.GetStream().CopyToAsync(memoryStreamWhois);
    StreamWriter streamWriter = new StreamWriter(tcpClinetWhois.GetStream());
    streamWriter.WriteLine(domain);
    streamWriter.Flush();
    copying.Wait(3000);
    toReturn = Encoding.ASCII.GetString(memoryStreamWhois.ToArray());
    if (toReturn.Contains("refer:"))
    {
        toReturn = Whois(domain, toReturn.Split('\n').Where(W => W.StartsWith("refer:")).Select(R => R.Replace("refer:", "").Trim()).First());
    }
    return toReturn;
}
```

When I run it, it works for most TLDs like .com or .org but not for .co.uk or .network and probably others too. I have no idea why it wouldn't work because the right WHOIS server gets selected for the TLD. I am also not getting any errors.

I'm using .Net7.0 and my Android 11 phone for testing.

I've tested this exact same function with the exact same domains on the same network but in a Console Application with no problems at all! Everything works fine except when I try this function in a Xamarin Application.

Body:
I'm trying to create an application where I have to use WHOIS to get some information I need.

To get the WHOIS information I use this function I found on here and adjusted a little:

string Whois(string domain, string whoisServer = "whois.iana.org")
{
    string toReturn = "";
    TcpClient tcpClinetWhois = new TcpClient(whoisServer, 43);
    MemoryStream memoryStreamWhois = new MemoryStream();
    Task copying = tcpClinetWhois.GetStream().CopyToAsync(memoryStreamWhois);
    StreamWriter streamWriter = new StreamWriter(tcpClinetWhois.GetStream());
    streamWriter.WriteLine(domain);
    streamWriter.Flush();
    copying.Wait(3000);
    toReturn = Encoding.ASCII.GetString(memoryStreamWhois.ToArray());
    if (toReturn.Contains("refer:"))
    {
        toReturn = Whois(domain, toReturn.Split('\n').Where(W => W.StartsWith("refer:")).Select(R => R.Replace("refer:", "").Trim()).First());
    }
    return toReturn;
}

When I run it, it works for most TLDs like .com or .org but not for .co.uk or .network and probably others too. I have no idea why it wouldn't work because the right WHOIS server gets selected for the TLD. I am also not getting any errors.

I'm using .Net7.0 and my Android 11 phone for testing.

I've tested this exact same function with the exact same domains on the same network but in a Console Application with no problems at all! Everything works fine except when I try this function in a Xamarin Application.


来源: stackexchange

问:
How can I stay organized when changing asset locations used by express.js server?
I have been learning express and everything seems to be clicking into place so I am trying now to concentrate on organization and keeping things clean and intuitive. I am wondering if there is a convention for storing where certain files are stored to be accessed by my server? The idea is for example I have a directory something like this:

```<code>root/
|--html
   |--html1.html
</code>```

but I want to change the structure mid project to:

```<code>root/
|--assets
   |--html
      |--html1.html
</code>```

Or for example as a site scales I decide to move my public directory to S3 or some other cloud storage instead.

Now I have to go back everywhere that sends that file and change the path or the entire middleware to send an s3 file.  My solution is this, and it works, but I am not sure if it is optimal or if there is a convention that might be better.

I can store everything in an asset module like this which has methods to return a file:

```<code>function getFile(path){
    return fs.readFileSync(path)
}

module.exports = {
    html1: getFile(`${__dirname}/html/html1.html`),
    html2: getFile(`${__dirname}/html/html2.html`,
    image1: getFile(`${__dirname}/image/image1.html`
}
</code>```

and import it into my server as "assets" and use it like this:

```<code>app.get('/*', (req, res, next) => {
    res.set('Content-Type', 'text/html');
    res.send(assets.html1);
  });
</code>```

Now if I want to change the path or even use an asset from s3 I can simply change the logic/function/path etc all in one place rather than going through all my routers manually etc.

Any feedback or guidance on where to look for more info is greatly appreciated!

ContentLicense: CC BY-SA 4.0

Body:
I have been learning express and everything seems to be clicking into place so I am trying now to concentrate on organization and keeping things clean and intuitive. I am wondering if there is a convention for storing where certain files are stored to be accessed by my server? The idea is for example I have a directory something like this:

root/
|--html
   |--html1.html

but I want to change the structure mid project to:

root/
|--assets
   |--html
      |--html1.html

Or for example as a site scales I decide to move my public directory to S3 or some other cloud storage instead.

Now I have to go back everywhere that sends that file and change the path or the entire middleware to send an s3 file.  My solution is this, and it works, but I am not sure if it is optimal or if there is a convention that might be better.

I can store everything in an asset module like this which has methods to return a file:

function getFile(path){
    return fs.readFileSync(path)
}

module.exports = {
    html1: getFile(`${__dirname}/html/html1.html`),
    html2: getFile(`${__dirname}/html/html2.html`,
    image1: getFile(`${__dirname}/image/image1.html`
}

and import it into my server as "assets" and use it like this:

app.get('/*', (req, res, next) => {
    res.set('Content-Type', 'text/html');
    res.send(assets.html1);
  });

Now if I want to change the path or even use an asset from s3 I can simply change the logic/function/path etc all in one place rather than going through all my routers manually etc.

Any feedback or guidance on where to look for more info is greatly appreciated!


问:
CSS classes for Gutenberg buttons block are not applying on frontend
I'm experiencing a problem with the buttons block in Gutenberg. When I make changes to the layout in the editor I can see them applied there, but on the frontend no classes are added.
The only way I interfere with the default behavior of blocks in the theme is by adding new buttons with wp.blocks.registerBlockStyle('core/button', {});. I've tried removing my code that affects the behavior of blocks, but it didn't change the situation. Do I need to add any additional code to support this feature?

Screenshot from the editor
Screenshot of the frontend


问:
How to put information in "bounds" on the x axis by openpyxl
The code generates a graph based on data from several dates, I want to filter the x axis, to show from year to year, but this problem is giving and I don't know how to solve it.

```<code>chart = AreaChart()
chart.style = 7
chart.x_axis.number_format = "yyyy"
chart.x_axis.scaling.min = 0
chart.x_axis.scaling.max = 350
chart.legend = None
chart.x_axis.auto = True

values = Reference(ws, range_string="Calculo!$E$2:$E$559")
categoria = Reference(ws, range_string="Calculo!$A$2:$A$559")
chart.add_data(values)
chart.set_categories(categoria)

chart2 = LineChart()
values2 = Reference(ws, range_string="Calculo!$F$2:$F$559")
categoria2 = Reference(ws, range_string="Calculo!$A$2:$A$559")
chart2.add_data(values2)
chart2.set_categories(categoria2)

s2 = chart2.series[0]
s2.marker.symbol = "dash"
s2.marker.graphicalProperties.solidFill = "FF0000" # Marker filling
s2.marker.graphicalProperties.line.solidFill = "FF0000" # Marker outline
chart += chart

wb["test"].add_chart(chart,"B6")
</code>```

I want to get this result:

when I remove the code chart.x_axis.auto = True, it looks like this.

Body:
The code generates a graph based on data from several dates, I want to filter the x axis, to show from year to year, but this problem is giving and I don't know how to solve it.

chart = AreaChart()
chart.style = 7
chart.x_axis.number_format = "yyyy"
chart.x_axis.scaling.min = 0
chart.x_axis.scaling.max = 350
chart.legend = None
chart.x_axis.auto = True

values = Reference(ws, range_string="Calculo!$E$2:$E$559")
categoria = Reference(ws, range_string="Calculo!$A$2:$A$559")
chart.add_data(values)
chart.set_categories(categoria)

chart2 = LineChart()
values2 = Reference(ws, range_string="Calculo!$F$2:$F$559")
categoria2 = Reference(ws, range_string="Calculo!$A$2:$A$559")
chart2.add_data(values2)
chart2.set_categories(categoria2)

s2 = chart2.series[0]
s2.marker.symbol = "dash"
s2.marker.graphicalProperties.solidFill = "FF0000" # Marker filling
s2.marker.graphicalProperties.line.solidFill = "FF0000" # Marker outline
chart += chart

wb["test"].add_chart(chart,"B6")

I want to get this result:

when I remove the code chart.x_axis.auto = True, it looks like this.


问:
Display an empty state illustration when tableview is empty
I am building a simple application with UIKit and Core Data. What I am trying to accomplish is simply display an empty state illustration when the tableview datasource is empty or essentially there's no data to display.

Times when this is valuable would be: 1) on initial usage of the app and the user hasn't yet populated any data 2) there is an error and want to display a custom image such as when the network timed out or 3) when a user cleared out all tasks/items such as an inbox.

```<code>if listOfItems.isEmpty {
    // display empty state illustration
} else {
    // display tableView
}
</code>```

I tried to create a custom cell with an illustration and text to render as 1 huge cell in the cellForRowAt but does not render correctly.

Body:
I am building a simple application with UIKit and Core Data. What I am trying to accomplish is simply display an empty state illustration when the tableview datasource is empty or essentially there's no data to display.

Times when this is valuable would be: 1) on initial usage of the app and the user hasn't yet populated any data 2) there is an error and want to display a custom image such as when the network timed out or 3) when a user cleared out all tasks/items such as an inbox.

if listOfItems.isEmpty {
    // display empty state illustration
} else {
    // display tableView
}

I tried to create a custom cell with an illustration and text to render as 1 huge cell in the cellForRowAt but does not render correctly.


问:
python tkinter frame widget background color is not showing
I have shared all my code snippet. But I think unnecessary/ so I had to delete most unrelated parts

I created tkinter GUI. The functionality works fine, but problem is as you will discover backgorund colors of frame widget does not show.

And I wonder why?

I guess, it is due to I did not write width and height of frame widget.

```<code>from tkinter import *
import pandas as pd

# Create object
root = Tk()

# Adjust size
root.geometry( "600x200" )

#create frames
frame1=Frame(root,bg='white')
frame1.grid(row=0,column=0)

frame1_2=Frame(root,bg='red')
frame1_2.grid(row=1,column=0)

frame1_3=Frame(root,bg='yellow')
frame1_3.grid(row=2,column=0)

frame2=Frame(root,bg='blue')
frame2.grid(row=0,column=1)

# Dropdown menu options
options = ls_categories
options2 = ls_country

# datatype of menu text
clicked = StringVar()
clickedCountry = StringVar()

# initial menu text
clicked.set( " None " )
clickedCountry.set( " None " )

# Create Dropdown menu
drop = OptionMenu( frame1 , clicked , *options )
drop.grid(row=0,column=0)
dropCountry = OptionMenu( frame1 , clickedCountry , *options2 )
dropCountry.grid(row=0,column=2)

# Create button, it will change label text
button = Button( frame1 ,width=13, text = "select" , command = show,padx=3,pady=3 ).grid(row=2,column=0)
btnChCat = Button( frame1 ,width=13, text = "choose Category" , command = choose,padx=3,pady=3 ).grid(row=1,column=0)
btnChCountry = Button( frame1 ,width=13, text = "choose Country" , command = chooseCountry,padx=3,pady=3  ).grid(row=1,column=2)
bntSubmit=Button(frame1_2,width=13,text="Search", command=f_submit,padx=3,pady=3 ).grid(row=0,column=0)
bntLinks=Button(frame1_3,width=13,text="GetWebLinks", command=a_links,padx=3,pady=3 ).grid(row=0,column=0)

# Create Label
label = Label( frame1 , text = " " )
label.grid(row=1,column=1)
label2 = Label( frame2 , text = " " )
label2.grid(row=4,column=0)

# Execute tkinter
root.mainloop()
</code>```

Body:
I have shared all my code snippet. But I think unnecessary/ so I had to delete most unrelated parts

I created tkinter GUI. The functionality works fine, but problem is as you will discover backgorund colors of frame widget does not show.

And I wonder why?

I guess, it is due to I did not write width and height of frame widget.

from tkinter import *
import pandas as pd

# Create object
root = Tk()

# Adjust size
root.geometry( "600x200" )

#create frames
frame1=Frame(root,bg='white')
frame1.grid(row=0,column=0)

frame1_2=Frame(root,bg='red')
frame1_2.grid(row=1,column=0)

frame1_3=Frame(root,bg='yellow')
frame1_3.grid(row=2,column=0)

frame2=Frame(root,bg='blue')
frame2.grid(row=0,column=1)

# Dropdown menu options
options = ls_categories
options2 = ls_country

# datatype of menu text
clicked = StringVar()
clickedCountry = StringVar()

# initial menu text
clicked.set( " None " )
clickedCountry.set( " None " )

# Create Dropdown menu
drop = OptionMenu( frame1 , clicked , *options )
drop.grid(row=0,column=0)
dropCountry = OptionMenu( frame1 , clickedCountry , *options2 )
dropCountry.grid(row=0,column=2)

# Create button, it will change label text
button = Button( frame1 ,width=13, text = "select" , command = show,padx=3,pady=3 ).grid(row=2,column=0)
btnChCat = Button( frame1 ,width=13, text = "choose Category" , command = choose,padx=3,pady=3 ).grid(row=1,column=0)
btnChCountry = Button( frame1 ,width=13, text = "choose Country" , command = chooseCountry,padx=3,pady=3  ).grid(row=1,column=2)
bntSubmit=Button(frame1_2,width=13,text="Search", command=f_submit,padx=3,pady=3 ).grid(row=0,column=0)
bntLinks=Button(frame1_3,width=13,text="GetWebLinks", command=a_links,padx=3,pady=3 ).grid(row=0,column=0)

# Create Label
label = Label( frame1 , text = " " )
label.grid(row=1,column=1)
label2 = Label( frame2 , text = " " )
label2.grid(row=4,column=0)

# Execute tkinter
root.mainloop()


问:
Python-Bottle internal Server Error 500 when uploading to S3 bucket and creating an PostgreSQL entry in RDS
so i explore the AWS at the moment and have a problem regarding an own little project.

I have a python bottle on an ec2-instance, a S3 bucket for uploads and a RDS instance (postgreSQL).

I have a script which lets me upload images (jpg and png).
Now I want to have an entry in my database for every upload I do.

The connection is established and all rules allow traffic from ec2-instance to S3 bucket, to RDS-instance and back.

After uploading, normally i get a message that it worked out, but now after including code in the python script to Write and Read from the database it just shows Internal Server Error 500.

Before it also put the upload in my S3 bucket, but now it puts it into my ec2-instance directory.
And creates a directory "user_uploads" which, actually should point to the S3 bucket, like it did before including the Code to Read/Write to the DB.

Can someone help me?

`

```<code>CREATE SCHEMA bottletube;
SET SCHEMA 'bottletube';

CREATE TABLE IF NOT EXISTS image_uploads
(
    id int GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    url VARCHAR(20) NOT NULL,
    category VARCHAR(64)
);
</code>```

`

`

```<code>#!/usr/bin/python3

import time
import os
import uuid
import psycopg2
import requests

from bottle import route, run, template, request
from boto3 import resource

BUCKET_NAME = 'python-bottle-hw'  # Replace with your bucket name
SAVE_PATH = 'user_uploads'

@route('/home')
@route('/')
def home():
    # SQL Query goes here later, now dummy data only
    # Read Entries from database
    items = []
    cursor.execute('SELECT * FROM image_uploads ORDER BY id')
    for record in cursor.fetchall():
        items.append({'id': record[0], 'filename': record[1], 'category': record[2]})
    return template('home.tpl', name='BoTube Home', items=items)

@route('/upload', method='GET')
def do_upload_get():
    return template('upload.tpl', name='Upload Image')

@route('/upload', method='POST')
def do_upload_post():
    category = request.forms.get('category')
    upload = request.files.get('file_upload')

    # Check for errors
    error_messages = []
    if not upload:
        error_messages.append('Please upload a file.')
    if not category:
        error_messages.append('Please enter a category.')

    try:
        name, ext = os.path.splitext(upload.filename)
        if ext not in ('.png', '.jpg', '.jpeg'):
            error_messages.append('File Type not allowed.')
    except:
        error_messages.append('Unknown error.')

    if error_messages:
        return template('upload.tpl', name='Upload Image', error_messages=error_messages)

    # Save to SAVE_PATH directory
    if not os.path.exists(SAVE_PATH):
        os.makedirs(SAVE_PATH)
    save_filename = f'{name}_{time.strftime("%Y%m%d-%H%M%S")}{ext}'
    with open(f'{SAVE_PATH}{save_filename}', 'wb') as open_file:
        open_file.write(upload.file.read())

 if ext == '.png':
        content_type = 'image/png'
    else:
        content_type = 'image/jpeg'

    # Upload to S3
    data = open(SAVE_PATH + save_filename, 'rb')
    s3_resource.Bucket(BUCKET_NAME).put_object(Key=f'user_uploads/{save_filename}',
                                               Body=data,
                                               Metadata={'Content-Type': content_type},
                                               ACL='public-read')

    # Write to DB
    cursor.execute(f"INSERT INTO image_uploads (url, category) VALUES ('user_uploads/{save_filename}', '{category}');")
    connection.commit()

    # Return template
    return template('upload_success.tpl', name='Upload Image')

if __name__ == '__main__':
    # Connect to DB
    connection = psycopg2.connect(user="postgres", host="endpoint of my database", password="here would be my password", database="bottletube")
    cursor = connection.cursor()
    cursor.execute("SET SCHEMA 'bottletube';")
    connection.commit()

    # Connect to S3
    s3_resource = resource('s3', region_name='us-east-1')

    # Needs to be customized
    # run(host='your_public_dns_name',
    run(host=requests.get('http://169.254.169.254/latest/meta-data/public-hostname').text,
        port=80)

</code>```

`

So this is my code, i know, never include passwords in code, i know how AWS secretmanager works but wanted to check function before i do that

Body:
so i explore the AWS at the moment and have a problem regarding an own little project.

I have a python bottle on an ec2-instance, a S3 bucket for uploads and a RDS instance (postgreSQL).

I have a script which lets me upload images (jpg and png).
Now I want to have an entry in my database for every upload I do.

The connection is established and all rules allow traffic from ec2-instance to S3 bucket, to RDS-instance and back.

After uploading, normally i get a message that it worked out, but now after including code in the python script to Write and Read from the database it just shows Internal Server Error 500.

Before it also put the upload in my S3 bucket, but now it puts it into my ec2-instance directory.
And creates a directory "user_uploads" which, actually should point to the S3 bucket, like it did before including the Code to Read/Write to the DB.

Can someone help me?

`

CREATE SCHEMA bottletube;
SET SCHEMA 'bottletube';

CREATE TABLE IF NOT EXISTS image_uploads
(
    id int GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    url VARCHAR(20) NOT NULL,
    category VARCHAR(64)
);

`

`

#!/usr/bin/python3

import time
import os
import uuid
import psycopg2
import requests

from bottle import route, run, template, request
from boto3 import resource

BUCKET_NAME = 'python-bottle-hw'  # Replace with your bucket name
SAVE_PATH = 'user_uploads'

@route('/home')
@route('/')
def home():
    # SQL Query goes here later, now dummy data only
    # Read Entries from database
    items = []
    cursor.execute('SELECT * FROM image_uploads ORDER BY id')
    for record in cursor.fetchall():
        items.append({'id': record[0], 'filename': record[1], 'category': record[2]})
    return template('home.tpl', name='BoTube Home', items=items)

@route('/upload', method='GET')
def do_upload_get():
    return template('upload.tpl', name='Upload Image')

@route('/upload', method='POST')
def do_upload_post():
    category = request.forms.get('category')
    upload = request.files.get('file_upload')

    # Check for errors
    error_messages = []
    if not upload:
        error_messages.append('Please upload a file.')
    if not category:
        error_messages.append('Please enter a category.')

    try:
        name, ext = os.path.splitext(upload.filename)
        if ext not in ('.png', '.jpg', '.jpeg'):
            error_messages.append('File Type not allowed.')
    except:
        error_messages.append('Unknown error.')

    if error_messages:
        return template('upload.tpl', name='Upload Image', error_messages=error_messages)

    # Save to SAVE_PATH directory
    if not os.path.exists(SAVE_PATH):
        os.makedirs(SAVE_PATH)
    save_filename = f'{name}_{time.strftime("%Y%m%d-%H%M%S")}{ext}'
    with open(f'{SAVE_PATH}{save_filename}', 'wb') as open_file:
        open_file.write(upload.file.read())

 if ext == '.png':
        content_type = 'image/png'
    else:
        content_type = 'image/jpeg'

    # Upload to S3
    data = open(SAVE_PATH + save_filename, 'rb')
    s3_resource.Bucket(BUCKET_NAME).put_object(Key=f'user_uploads/{save_filename}',
                                               Body=data,
                                               Metadata={'Content-Type': content_type},
                                               ACL='public-read')

    # Write to DB
    cursor.execute(f"INSERT INTO image_uploads (url, category) VALUES ('user_uploads/{save_filename}', '{category}');")
    connection.commit()

    # Return template
    return template('upload_success.tpl', name='Upload Image')

if __name__ == '__main__':
    # Connect to DB
    connection = psycopg2.connect(user="postgres", host="endpoint of my database", password="here would be my password", database="bottletube")
    cursor = connection.cursor()
    cursor.execute("SET SCHEMA 'bottletube';")
    connection.commit()

    # Connect to S3
    s3_resource = resource('s3', region_name='us-east-1')

    # Needs to be customized
    # run(host='your_public_dns_name',
    run(host=requests.get('http://169.254.169.254/latest/meta-data/public-hostname').text,
        port=80)

`

So this is my code, i know, never include passwords in code, i know how AWS secretmanager works but wanted to check function before i do that


问:
Maven download the *.lastupdated files
When I try to to install maven project in local repository, I notice that pom and jar files have .lastUpdated extension. Because of this issue I cannot build my project which depends on it.

I tried the following approach, but it was ineffective.

1.mvn -U clean install

2.project -> Maven -> update maven project -> force update of snapshots/Releases

3.Project -> Run as -> Maven clean(Working- build success) &&  Project -> Run as -> Maven install(build failed)

Maven Version: Apache Maven 3.8.6

I've created a simple Maven project. I got below error in pom.xml

```<code>   Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.12.4/maven-surefire-common-2.12.4.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.413 s
[INFO] Finished at: 2022-12-08T09:33:19+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project test: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom: Unsupported or unrecognized SSL message -> [Help 1]
</code>```

Also, I checked that the download files have the.lastupdated extension in the {userpath}.m2\repository path.

Title: Maven download the *.lastupdated files

Body:
When I try to to install maven project in local repository, I notice that pom and jar files have .lastUpdated extension. Because of this issue I cannot build my project which depends on it.

I tried the following approach, but it was ineffective.

1.mvn -U clean install

2.project -> Maven -> update maven project -> force update of snapshots/Releases

3.Project -> Run as -> Maven clean(Working- build success) &&  Project -> Run as -> Maven install(build failed)

Maven Version: Apache Maven 3.8.6

I've created a simple Maven project. I got below error in pom.xml

   Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.12.4/maven-surefire-common-2.12.4.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchain/2.0.9/maven-toolchain-2.0.9.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.413 s
[INFO] Finished at: 2022-12-08T09:33:19+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project test: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.pom: Unsupported or unrecognized SSL message -> [Help 1]

Also, I checked that the download files have the.lastupdated extension in the {userpath}.m2\repository path.


问:
Leaking memory when C++ ODBC app connects to Redshift DB
We are developing Linux service application based on Ubuntu 22.04 and C++20 and the application connects to AWS Redshift service using unixODBC.

In debug build we are running ASAN with enabled LeakSanitizer, that records memory leak originating from SQLDriverConnect.

I have the following (latest & greatest that time when the problem discovered) driver installed:
https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.59.1000/AmazonRedshiftODBC-64-bit-1.4.59.1000-1.x86_64.deb

I also tried with an earlier version of Redshift ODBC driver too.

Running the following command line, I can constantly reproduce the following memory leak report:
ASAN_OPTIONS=verbosity=1:fast_unwind_on_malloc=0:check_initialization_order=1 ./memleak

The minimal example to reproduce the program:

```<code>#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include <string>

  int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv_char[], __attribute__((unused)) char* env_char[]) {
    SQLHENV env = nullptr;
    std::cerr << SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env) << std::endl;

    std::cerr << SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, reinterpret_cast<SQLPOINTER>(SQL_OV_ODBC3), 0) << std::endl;

    SQLHDBC dbc = nullptr;
    std::cerr << SQLAllocHandle(SQL_HANDLE_DBC, env, &dbc) << std::endl;

    std::cerr << SQLSetConnectAttr(dbc, SQL_ATTR_AUTOCOMMIT, reinterpret_cast<SQLPOINTER>(true), 0) << std::endl;

    std::string connectionString = "Driver={Amazon Redshift (x64)};Server=<...>;Port=5439;Database=<...>;UID=<...>;PWD=<...>";
    std::cerr << SQLDriverConnect(dbc, nullptr, (SQLCHAR*)connectionString.c_str(), connectionString.size(), nullptr, 0, nullptr, SQL_DRIVER_COMPLETE) << std::endl;

    std::cerr << SQLDisconnect(dbc) << std::endl;
    std::cerr << SQLFreeHandle(SQL_HANDLE_DBC, dbc) << std::endl;

    std::cerr << SQLFreeHandle(SQL_HANDLE_ENV, env) << std::endl;

    return 0;
}
</code>```

The ASAN log output:

```==30839==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9db8 in __interceptor_calloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3db8) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4f8e  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fbea8967 in operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x13dd967)
    #2 0x7f21fb1c2538 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring*) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f7538)
    #3 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
    #4 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #5 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #6 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #7 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #8 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #9 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #10 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #11 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #12 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #13 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #14 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fb131fa6 in sbicu_58__sb64::UnicodeString::allocate(int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x666fa6)
    #2 0x7f21fb132307 in sbicu_58__sb64::UnicodeString::UnicodeString(int, int, int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x667307)
    #3 0x7f21fb2165d4 in Simba::Support::simba_wstring::GetWritableBuffer(int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x74b5d4)
    #4 0x7f21fb23a712 in Simba::Support::WideStringConverter::ConvertToWString(unsigned char const*, int, Simba::Support::EncodingType, Simba::Support::simba_wstring&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x76f712)
    #5 0x7f21fad8b190 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0190)
    #6 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #7 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #8 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fb0cf2c8 in sbicu_58__sb64::UMemory::operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6042c8)
    #2 0x7f21fb213d90 in Simba::Support::simba_wstring::simba_wstring(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x748d90)
    #3 0x7f21fb1c25d0 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f75d0)
    #4 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
    #5 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #6 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #7 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #8 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #9 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #10 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #11 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #12 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #13 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #14 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #15 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 10 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4fa8  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fbea8967 in operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x13dd967)
    #2 0x7f21fb1c25c2 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f75c2)
    #3 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
    #4 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #5 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #6 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #7 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #8 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #9 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #10 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #11 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #12 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #13 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #14 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4fb8  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4fdf  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b502f  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

SUMMARY: AddressSanitizer: 353 byte(s) leaked in 9 allocation(s).
```

Body:
We are developing Linux service application based on Ubuntu 22.04 and C++20 and the application connects to AWS Redshift service using unixODBC.

In debug build we are running ASAN with enabled LeakSanitizer, that records memory leak originating from SQLDriverConnect.

I have the following (latest & greatest that time when the problem discovered) driver installed:
https://s3.amazonaws.com/redshift-downloads/drivers/odbc/1.4.59.1000/AmazonRedshiftODBC-64-bit-1.4.59.1000-1.x86_64.deb

I also tried with an earlier version of Redshift ODBC driver too.

Running the following command line, I can constantly reproduce the following memory leak report:
ASAN_OPTIONS=verbosity=1:fast_unwind_on_malloc=0:check_initialization_order=1 ./memleak

The minimal example to reproduce the program:

#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include <string>

  int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv_char[], __attribute__((unused)) char* env_char[]) {
    SQLHENV env = nullptr;
    std::cerr << SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env) << std::endl;

    std::cerr << SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, reinterpret_cast<SQLPOINTER>(SQL_OV_ODBC3), 0) << std::endl;

    SQLHDBC dbc = nullptr;
    std::cerr << SQLAllocHandle(SQL_HANDLE_DBC, env, &dbc) << std::endl;

    std::cerr << SQLSetConnectAttr(dbc, SQL_ATTR_AUTOCOMMIT, reinterpret_cast<SQLPOINTER>(true), 0) << std::endl;

    std::string connectionString = "Driver={Amazon Redshift (x64)};Server=<...>;Port=5439;Database=<...>;UID=<...>;PWD=<...>";
    std::cerr << SQLDriverConnect(dbc, nullptr, (SQLCHAR*)connectionString.c_str(), connectionString.size(), nullptr, 0, nullptr, SQL_DRIVER_COMPLETE) << std::endl;

    std::cerr << SQLDisconnect(dbc) << std::endl;
    std::cerr << SQLFreeHandle(SQL_HANDLE_DBC, dbc) << std::endl;

    std::cerr << SQLFreeHandle(SQL_HANDLE_ENV, env) << std::endl;

    return 0;
}

The ASAN log output:

==30839==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9db8 in __interceptor_calloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3db8) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4f8e  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fbea8967 in operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x13dd967)
    #2 0x7f21fb1c2538 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring*) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f7538)
    #3 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
    #4 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #5 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #6 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #7 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #8 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #9 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #10 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #11 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #12 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #13 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #14 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fb131fa6 in sbicu_58__sb64::UnicodeString::allocate(int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x666fa6)
    #2 0x7f21fb132307 in sbicu_58__sb64::UnicodeString::UnicodeString(int, int, int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x667307)
    #3 0x7f21fb2165d4 in Simba::Support::simba_wstring::GetWritableBuffer(int) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x74b5d4)
    #4 0x7f21fb23a712 in Simba::Support::WideStringConverter::ConvertToWString(unsigned char const*, int, Simba::Support::EncodingType, Simba::Support::simba_wstring&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x76f712)
    #5 0x7f21fad8b190 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0190)
    #6 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #7 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #8 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fb0cf2c8 in sbicu_58__sb64::UMemory::operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6042c8)
    #2 0x7f21fb213d90 in Simba::Support::simba_wstring::simba_wstring(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x748d90)
    #3 0x7f21fb1c25d0 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f75d0)
    #4 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
    #5 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #6 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #7 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #8 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #9 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #10 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #11 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #12 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #13 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #14 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #15 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 10 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4fa8  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3ea9bce in malloc (/.../build-...-Clang_14-Debug/.../memleak+0xa3bce) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fbea8967 in operator new(unsigned long) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x13dd967)
    #2 0x7f21fb1c25c2 in Simba::Support::AttributeData::MakeNewWStringAttributeData(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x6f75c2)
    #3 0x7f21fad8b198 in Simba::PostgreSQLODBC::PGOConnection::HandleConnect(std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > > const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0x2c0198)
    #4 0x7f21fb68eb2e in Simba::DriverSupport::DSCommonConnection::Connect(Simba::DSI::ConnectionSettingsRequest const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xbc3b2e)
    #5 0x7f21fb5fbcfc in Simba::ODBC::Connection::CompleteConnection(Simba::ODBC::ConnectionSettings&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb30cfc)
    #6 0x7f21fb601c75 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c75)
    #7 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #8 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #9 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #10 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #11 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #12 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #13 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #14 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 5 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4fb8  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b4fdf  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

Indirect leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x55a8d3e94933 in __interceptor___strdup (/.../build-...-Clang_14-Debug/.../memleak+0x8e933) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)
    #1 0x7f21fa8b502f  (<unknown module>)
    #2 0x7f21fa8b534c  (<unknown module>)
    #3 0x7f21fb606f19 in Simba::ODBC::ODBCIniReader::GetKeyValuePairs(Simba::ODBC::ODBCIniReader::Source, Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3bf19)
    #4 0x7f21fb6093fe in Simba::ODBC::ConnectionSettings::LoadFromOdbcIni(Simba::Support::simba_wstring const&, std::map<Simba::Support::simba_wstring, Simba::Support::Variant, Simba::Support::simba_wstring::CaseInsensitiveComparator, std::allocator<std::pair<Simba::Support::simba_wstring const, Simba::Support::Variant> > >&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3e3fe)
    #5 0x7f21fb609a3a in Simba::ODBC::ConnectionSettings::LoadODBCSettings() (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3ea3a)
    #6 0x7f21fb60a427 in Simba::ODBC::ConnectionSettings::LoadSettings(Simba::Support::simba_wstring const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f427)
    #7 0x7f21fb60a764 in Simba::ODBC::ConnectionSettings::ConnectionSettings(Simba::Support::simba_wstring const&, Simba::ODBC::Connection&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb3f764)
    #8 0x7f21fb601c24 in Simba::ODBC::ConnectionState2::SQLDriverConnectW(Simba::ODBC::Connection*, void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb36c24)
    #9 0x7f21fb5f5220 in Simba::ODBC::Connection::SQLDriverConnectW(void*, wchar_t*, short, wchar_t*, short, short*, unsigned short) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xb2a220)
    #10 0x7f21fb5b3133 in Simba::ODBC::SQLDriverConnectTask<false>::DoSynchronously(Simba::ODBC::Connection&, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters const&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae8133)
    #11 0x7f21fb5c6e5a in short DoTask<Simba::ODBC::SQLDriverConnectTask<false> >(char const*, void*, Simba::ODBC::SQLDriverConnectTask<false>::TaskParameters&) (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xafbe5a)
    #12 0x7f21fb5b35e4 in SQLDriverConnect (/opt/amazon/redshiftodbc/lib/64/libamazonredshiftodbc64.so+0xae85e4)
    #13 0x7f22018555a6 in SQLDriverConnect /bamboo/unixODBC-2.3.7/DriverManager/SQLDriverConnect.c:1376
    #14 0x55a8d3ee7a06 in main /.../.../.../.../Memleak.cpp:18:18
    #15 0x7f220119a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #16 0x55a8d3e274bd in _start (/.../build-...-Clang_14-Debug/.../memleak+0x214bd) (BuildId: 850d8cc71ac471cad6a45c89d7d3d2ac413d856f)

SUMMARY: AddressSanitizer: 353 byte(s) leaked in 9 allocation(s).


问:
Copying (exporting) and importing a partitioned table in PostgreSQL
I would like to export a partitioned table in PostgreSQL and then import it into the same table (already created with all the relations, etc.) in another PostgreSQL database. Is it possible, how could it be done?

I am using the export function of the pgAdmin tool and I get the following error:

"ERROR: cannot copy from partitioned table HINT: Try the COPY (SELECT
...) TO variant".


问:
How to insert a long text in a multirow on overleaf?
Helle,
I would like to create a table wit my 2 first row being multirows with one filled with a long text, followed by a 2 column's row.
I don't have any issue to create the multirows or insert the long text in the typical columns but when I use the \multirow function my text overflows and messes up my table.

I used the following code :

```<code>
{\footnotesize
 \begin{tabularx}{\textwidth}[h!]{| X | X |}
 \caption{Description of the selected algorithms\label{TABLEA}}\\

 \hline
 \multicolumn{2}{| c |}{Begin of Table}\\
 \hline
Algorithm & General Operation \\
 \hline
 \endfirsthead

 \hline
 \multicolumn{2}{| c |}{Continuation of Table \ref{TABLEA}}\\
 \hline
Algorithm & General Operation \\
 \hline
 \endhead

 \hline
 \endfoot

 \hline
 \multicolumn{2}{| c |}{End of Table}\\
 \hline\hline
 \endlastfoot

   \multicolumn{2}{| c |}{\textbf{Agglomerative methods}} \\
   \multicolumn{2}{| c|}{The notion of distance in this family makes it possible to identify cliques through relational proximities (in the network) that favor the exchange of resources..........} \\
   \hline
           \textbf{Hierarchical algorithm} with 4 different settings:  Euclidean distance / Complete linkage; Euclidean distance / Ward; Manhattan distance / Complete linkage; Manhattan distance / Ward.
           & The basic idea is to construct the hierarchical relationship among data in order to cluster. Each data point stands for an individual cluster in the beginning, and then, the most neighboring two clusters are merged into a new one until there is only one cluster left. The concept of "neighborhood" depends on the distance between nodes which is computed by squaring the Euclidean or Manhattan distances and grouping them into a symmetric matrix. The clustering method (here, complete linkage and Ward's algorithm) identifies the closest nodes to agglomerate them. We obtain a hierarchical dendogram which is cut to the desired number of clusters. \\

 \end{tabularx}
}

\end{document}
</code>```

which gives me that table :
enter image description here

Do you know how to overcome this issue?

I tried the same code as usual for \multicolumn but it doesn't seems to suit long text.

Body:
Helle,
I would like to create a table wit my 2 first row being multirows with one filled with a long text, followed by a 2 column's row.
I don't have any issue to create the multirows or insert the long text in the typical columns but when I use the \multirow function my text overflows and messes up my table.

I used the following code :

{\footnotesize
 \begin{tabularx}{\textwidth}[h!]{| X | X |}
 \caption{Description of the selected algorithms\label{TABLEA}}\\

 \hline
 \multicolumn{2}{| c |}{Begin of Table}\\
 \hline
Algorithm & General Operation \\
 \hline
 \endfirsthead

 \hline
 \multicolumn{2}{| c |}{Continuation of Table \ref{TABLEA}}\\
 \hline
Algorithm & General Operation \\
 \hline
 \endhead

 \hline
 \endfoot

 \hline
 \multicolumn{2}{| c |}{End of Table}\\
 \hline\hline
 \endlastfoot

   \multicolumn{2}{| c |}{\textbf{Agglomerative methods}} \\
   \multicolumn{2}{| c|}{The notion of distance in this family makes it possible to identify cliques through relational proximities (in the network) that favor the exchange of resources..........} \\
   \hline
           \textbf{Hierarchical algorithm} with 4 different settings:  Euclidean distance / Complete linkage; Euclidean distance / Ward; Manhattan distance / Complete linkage; Manhattan distance / Ward.
           & The basic idea is to construct the hierarchical relationship among data in order to cluster. Each data point stands for an individual cluster in the beginning, and then, the most neighboring two clusters are merged into a new one until there is only one cluster left. The concept of "neighborhood" depends on the distance between nodes which is computed by squaring the Euclidean or Manhattan distances and grouping them into a symmetric matrix. The clustering method (here, complete linkage and Ward's algorithm) identifies the closest nodes to agglomerate them. We obtain a hierarchical dendogram which is cut to the desired number of clusters. \\

 \end{tabularx}
}

\end{document}

which gives me that table :
enter image description here

Do you know how to overcome this issue?

I tried the same code as usual for \multicolumn but it doesn't seems to suit long text.


问:
Filter values by text
I have 1578 path, stored as a values (character). I want choose just path which have "/COU/". Sorry, but i am quite new in R, and i have not found the answer yet.

my code:

```<code>files <- list.files("D:/*/", recursive=T)
</code>```

and now i have list of 1578 files and i want choose only files, where part of path is "COU"

Best Regards!

I tried:
files_selected <- filter(files, "*/COU/*") and few another options (like subset) but it not work.

Title: Filter values by text

Body:
I have 1578 path, stored as a values (character). I want choose just path which have "/COU/". Sorry, but i am quite new in R, and i have not found the answer yet.

my code:

files <- list.files("D:/*/", recursive=T)

and now i have list of 1578 files and i want choose only files, where part of path is "COU"

Best Regards!

I tried:
files_selected <- filter(files, "*/COU/*") and few another options (like subset) but it not work.


问:
How to get non-root log statements using fileConfig without specifying each one?
How do I get imported modules to show up in my filehandler without specifying each one?

When I run the "main.py", the 'sLogger' information is specified in the "log.txt" file, but not the 'module_a' information. The 'module_a' info only shows up in the console window.

I know I can fix this by adding a separate logger for 'module_a', but don't want to do this for every single module I want to get logging information from.

I thought setting 'disable_existing_loggers=False' to False would resolve this, but it isn't.
Am I doing something incorrectly there?

I also don't want to push everything with the root logger.
If I add fileHandler to the root I get everything, but I don't want to get info from the root logger.

main.py

```<code>import logging
from logging import config

logging.config.fileConfig("logger_config.txt", defaults={'logfilename': "test.log"}, disable_existing_loggers=False)

logger = logging.getLogger("sLogger")
logger.info("test")

logging.info("test")

import module_a
</code>```

module_A.py:

```<code>logger = loging.getLogger(__name__)
logger.info("Test Log Message")
</code>```

file_config.txt

```<code>[loggers]
keys=root, sLogger

[handlers]
keys=consoleHandler,fileHandler

[formatters]
keys=fileFormatter,consoleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler

[logger_sLogger]
level=DEBUG
handlers=consoleHandler,fileHandler
qualname=sLogger
propagate=0

[logger_parser]
level=DEBUG
handlers=consoleHandler,fileHandler
qualname=sLogger
propagate=1

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=consoleFormatter
args=(sys.stdout,)

[handler_fileHandler]
class=FileHandler
level=INFO
formatter=fileFormatter
args=('%(logfilename)s',)

[formatter_fileFormatter]
format=%(asctime)s - %(name)s - %(levelname)s: %(message)s
datefmt=

[formatter_consoleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s: %(message)s
datefmt=
</code>```

Body:
How do I get imported modules to show up in my filehandler without specifying each one?

When I run the "main.py", the 'sLogger' information is specified in the "log.txt" file, but not the 'module_a' information. The 'module_a' info only shows up in the console window.

I know I can fix this by adding a separate logger for 'module_a', but don't want to do this for every single module I want to get logging information from.

I thought setting 'disable_existing_loggers=False' to False would resolve this, but it isn't.
Am I doing something incorrectly there?

I also don't want to push everything with the root logger.
If I add fileHandler to the root I get everything, but I don't want to get info from the root logger.

main.py

import logging
from logging import config

logging.config.fileConfig("logger_config.txt", defaults={'logfilename': "test.log"}, disable_existing_loggers=False)

logger = logging.getLogger("sLogger")
logger.info("test")

logging.info("test")

import module_a

module_A.py:

logger = loging.getLogger(__name__)
logger.info("Test Log Message")

file_config.txt

[loggers]
keys=root, sLogger

[handlers]
keys=consoleHandler,fileHandler

[formatters]
keys=fileFormatter,consoleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler

[logger_sLogger]
level=DEBUG
handlers=consoleHandler,fileHandler
qualname=sLogger
propagate=0

[logger_parser]
level=DEBUG
handlers=consoleHandler,fileHandler
qualname=sLogger
propagate=1

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=consoleFormatter
args=(sys.stdout,)

[handler_fileHandler]
class=FileHandler
level=INFO
formatter=fileFormatter
args=('%(logfilename)s',)

[formatter_fileFormatter]
format=%(asctime)s - %(name)s - %(levelname)s: %(message)s
datefmt=

[formatter_consoleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s: %(message)s
datefmt=